package Gui;

import Current.*;
import Current.Armory.DefenseArmory;
import Current.Armory.OffenseArmory;
import Current.Armory.SpyDefenseArmory;
import Current.Armory.SpyOffenseArmory;
import Preferences.AccountInUse;
import info.clearthought.layout.TableLayout;
import info.clearthought.layout.TableLayoutConstraints;

import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.*;

/**
 * @author Fork
 */
class MainInterface extends JFrame {

    private Account act = AccountInUse.getAccountInUse();
    private UnitTraining units = act.getUnits();
    private WarStats stats = act.getStats();
    private Race race = act.getRace();
    private ClassDT classDT = act.getClassDT();
    private ProeficiencyPoints points = act.getPoints();
    private StructureUpgrades structures = act.getStructures();
    private Economy economy = act.getEconomy();
    private Armories armories = act.getArmories();
    private BattleUpgrades battleUpgrades = act.getBattleUpgrades();
    private OffenseArmory offArmory = armories.getOffArmory();
    private DefenseArmory defArmory = armories.getDefArmory();
    private SpyOffenseArmory spyOffArmory = armories.getSpyOffArmory();
    private SpyDefenseArmory spyDefArmory = armories.getSpyDefArmory();


    public MainInterface() {
        initComponents();
    }

    private void refreshButtonMouseClicked(MouseEvent e) {
        refreshEverything();
    }

    private void welcomeLineUpdater() {
        act.setLevel((Integer) levelSpinner.getValue());
        welcomeLine.setText(AccountInUse.toWelcomeLine());
    }

    private void proeficiencyPointsUpdater() {
        points.setStrength((Integer) strengthSpinner.getValue());
        points.setConstitution((Integer) constitutionSpinner.getValue());
        points.setIntelligence((Integer) intelligenceSpinner.getValue());
        points.setWealth((Integer) wealthSpinner.getValue());
        points.setCharisma((Integer) charismaSpinner.getValue());
    }

    private void structureUpdater() {
        structures.setGoldPerMiner((Integer) goldPerWorkerSpinner.getValue());
        structures.setFortGoldPerTurn((Integer) fortGoldPerTurnSpinner.getValue());
        structures.setDefenseBonus((Integer) defenseBonusSpinner.getValue());
        structures.setOffFortBonus((Integer) offenseBonusSpinner.getValue());
        structures.setSpyOffFortBonus((Integer) spyOffenseBonusSpinner.getValue());
        structures.setSpyDefFortBonus((Integer) spyDefenseBonusSpinner.getValue());
    }

    private void armoryUpdater() {
        offenseArmoryUpdater();
        defenseArmoryUpdater();
        spyOffenseArmoryUpdater();
        spyDefenseArmoryUpdater();

        offArmory.setSoldiers(units.getTotalSoldiers());
        defArmory.setGuards(units.getTotalGuards());
        spyOffArmory.setSpies(units.getTotalSpies());
        spyDefArmory.setSentries(units.getTotalSentries());

    }

    private void offenseArmoryUpdater() {
        weaponsUpdater(offArmory);
        helmsUpdater(offArmory);
        armorsUpdater(offArmory);
        bootsUpdater(offArmory);
        bracersUpdater(offArmory);
        shieldsUpdater(offArmory);
    }

    private void defenseArmoryUpdater() {
        weaponsUpdater(defArmory);
        helmsUpdater(defArmory);
        armorsUpdater(defArmory);
        bootsUpdater(defArmory);
        bracersUpdater(defArmory);
        shieldsUpdater(defArmory);
    }

    private void spyOffenseArmoryUpdater() {
        weaponsUpdater(spyOffArmory);
        helmsUpdater(spyOffArmory);
        armorsUpdater(spyOffArmory);
        bootsUpdater(spyOffArmory);
        bracersUpdater(spyOffArmory);
        shieldsUpdater(spyOffArmory);
    }

    private void spyDefenseArmoryUpdater() {
        weaponsUpdater(spyDefArmory);
        helmsUpdater(spyDefArmory);
        armorsUpdater(spyDefArmory);
        bootsUpdater(spyDefArmory);
        bracersUpdater(spyDefArmory);
        shieldsUpdater(spyDefArmory);

    }

    private void weaponsUpdater(OffenseArmory Armory) {
        Armory.getWeapons().setCostToBuy((Integer) weaponsPriceSpinner.getValue());
        Armory.getWeapons().setOffenseIncrease((Integer) weaponsBonusSpinner.getValue());
        Armory.getWeapons().setHave((Integer) weaponsQuantitySpinner.getValue());
    }

    private void weaponsUpdater(DefenseArmory Armory) {
        Armory.getWeapons().setCostToBuy((Integer) weaponsPriceSpinner2.getValue());
        Armory.getWeapons().setDefenseBonus((Integer) weaponsBonusSpinner2.getValue());
        Armory.getWeapons().setHave((Integer) weaponsQuantitySpinner2.getValue());
    }

    private void weaponsUpdater(SpyOffenseArmory Armory) {
        Armory.getWeapons().setCostToBuy((Integer) weaponsPriceSpinner3.getValue());
        Armory.getWeapons().setSpyOffenseBonus((Integer) weaponsBonusSpinner3.getValue());
        Armory.getWeapons().setHave((Integer) weaponsQuantitySpinner3.getValue());
    }

    private void weaponsUpdater(SpyDefenseArmory Armory) {
        Armory.getWeapons().setCostToBuy((Integer) weaponsPriceSpinner4.getValue());
        Armory.getWeapons().setSpyDefenseBonus((Integer) weaponsBonusSpinner4.getValue());
        Armory.getWeapons().setHave((Integer) weaponsQuantitySpinner4.getValue());
    }

    private void helmsUpdater(OffenseArmory armory) {
        armory.getHelms().setCostToBuy((Integer) helmsPriceSpinner.getValue());
        armory.getHelms().setOffenseIncrease((Integer) helmsBonusSpinner.getValue());
        armory.getHelms().setHave((Integer) helmsQuantitySpinner.getValue());
    }

    private void helmsUpdater(DefenseArmory armory) {
        armory.getHelms().setCostToBuy((Integer) helmsPriceSpinner2.getValue());
        armory.getHelms().setDefenseBonus((Integer) helmsBonusSpinner2.getValue());
        armory.getHelms().setHave((Integer) helmsQuantitySpinner2.getValue());
    }

    private void helmsUpdater(SpyOffenseArmory armory) {
        armory.getHelms().setCostToBuy((Integer) helmsPriceSpinner3.getValue());
        armory.getHelms().setSpyOffenseBonus((Integer) helmsBonusSpinner3.getValue());
        armory.getHelms().setHave((Integer) helmsQuantitySpinner3.getValue());
    }

    private void helmsUpdater(SpyDefenseArmory armory) {
        armory.getHelms().setCostToBuy((Integer) helmsPriceSpinner4.getValue());
        armory.getHelms().setSpyDefenseBonus((Integer) helmsBonusSpinner4.getValue());
        armory.getHelms().setHave((Integer) helmsQuantitySpinner4.getValue());
    }

    private void armorsUpdater(OffenseArmory armory) {
        armory.getArmors().setCostToBuy((Integer) armorsPriceSpinner.getValue());
        armory.getArmors().setOffenseIncrease((Integer) armorsBonusSpinner.getValue());
        armory.getArmors().setHave((Integer) armorsQuantitySpinner.getValue());
    }

    private void armorsUpdater(DefenseArmory armory) {
        armory.getArmors().setCostToBuy((Integer) armorsPriceSpinner2.getValue());
        armory.getArmors().setDefenseBonus((Integer) armorsBonusSpinner2.getValue());
        armory.getArmors().setHave((Integer) armorsQuantitySpinner2.getValue());
    }

    private void armorsUpdater(SpyOffenseArmory armory) {
        armory.getArmors().setCostToBuy((Integer) armorsPriceSpinner3.getValue());
        armory.getArmors().setSpyOffenseBonus((Integer) armorsBonusSpinner3.getValue());
        armory.getArmors().setHave((Integer) armorsQuantitySpinner3.getValue());
    }

    private void armorsUpdater(SpyDefenseArmory armory) {
        armory.getArmors().setCostToBuy((Integer) armorsPriceSpinner4.getValue());
        armory.getArmors().setSpyDefenseBonus((Integer) armorsBonusSpinner4.getValue());
        armory.getArmors().setHave((Integer) armorsQuantitySpinner4.getValue());
    }

    private void bootsUpdater(OffenseArmory armory) {
        armory.getBoots().setCostToBuy((Integer) bootsPriceSpinner.getValue());
        armory.getBoots().setOffenseIncrease((Integer) bootsBonusSpinner.getValue());
        armory.getBoots().setHave((Integer) bootsQuantitySpinner.getValue());
    }

    private void bootsUpdater(DefenseArmory armory) {
        armory.getBoots().setCostToBuy((Integer) bootsPriceSpinner2.getValue());
        armory.getBoots().setDefenseBonus((Integer) bootsBonusSpinner2.getValue());
        armory.getBoots().setHave((Integer) bootsQuantitySpinner2.getValue());
    }

    private void bootsUpdater(SpyOffenseArmory armory) {
        armory.getBoots().setCostToBuy((Integer) bootsPriceSpinner3.getValue());
        armory.getBoots().setSpyOffenseBonus((Integer) bootsBonusSpinner3.getValue());
        armory.getBoots().setHave((Integer) bootsQuantitySpinner3.getValue());
    }

    private void bootsUpdater(SpyDefenseArmory armory) {
        armory.getBoots().setCostToBuy((Integer) bootsPriceSpinner4.getValue());
        armory.getBoots().setSpyDefenseBonus((Integer) bootsBonusSpinner4.getValue());
        armory.getBoots().setHave((Integer) bootsQuantitySpinner4.getValue());
    }

    private void bracersUpdater(OffenseArmory armory) {
        armory.getBracers().setCostToBuy((Integer) bracersPriceSpinner.getValue());
        armory.getBracers().setOffenseIncrease((Integer) bracersBonusSpinner.getValue());
        armory.getBracers().setHave((Integer) bracersQuantitySpinner.getValue());
    }

    private void bracersUpdater(DefenseArmory armory) {
        armory.getBracers().setCostToBuy((Integer) bracersPriceSpinner2.getValue());
        armory.getBracers().setDefenseBonus((Integer) bracersBonusSpinner2.getValue());
        armory.getBracers().setHave((Integer) bracersQuantitySpinner2.getValue());
    }

    private void bracersUpdater(SpyOffenseArmory armory) {
        armory.getBracers().setCostToBuy((Integer) bracersPriceSpinner3.getValue());
        armory.getBracers().setSpyOffenseBonus((Integer) bracersBonusSpinner3.getValue());
        armory.getBracers().setHave((Integer) bracersQuantitySpinner3.getValue());
    }

    private void bracersUpdater(SpyDefenseArmory armory) {
        armory.getBracers().setCostToBuy((Integer) bracersPriceSpinner4.getValue());
        armory.getBracers().setSpyDefenseBonus((Integer) bracersBonusSpinner4.getValue());
        armory.getBracers().setHave((Integer) bracersQuantitySpinner4.getValue());
    }

    private void shieldsUpdater(OffenseArmory armory) {
        armory.getShields().setCostToBuy((Integer) shieldsPriceSpinner.getValue());
        armory.getShields().setOffenseIncrease((Integer) shieldsBonusSpinner.getValue());
        armory.getShields().setHave((Integer) shieldsQuantitySpinner.getValue());
    }

    private void shieldsUpdater(DefenseArmory armory) {
        armory.getShields().setCostToBuy((Integer) shieldsPriceSpinner2.getValue());
        armory.getShields().setDefenseBonus((Integer) shieldsBonusSpinner2.getValue());
        armory.getShields().setHave((Integer) shieldsQuantitySpinner2.getValue());
    }

    private void shieldsUpdater(SpyOffenseArmory armory) {
        armory.getShields().setCostToBuy((Integer) shieldsPriceSpinner3.getValue());
        armory.getShields().setSpyOffenseBonus((Integer) shieldsBonusSpinner3.getValue());
        armory.getShields().setHave((Integer) shieldsQuantitySpinner3.getValue());
    }

    private void shieldsUpdater(SpyDefenseArmory armory) {
        armory.getShields().setCostToBuy((Integer) shieldsPriceSpinner4.getValue());
        armory.getShields().setSpyDefenseBonus((Integer) shieldsBonusSpinner4.getValue());
        armory.getShields().setHave((Integer) shieldsQuantitySpinner4.getValue());
    }

    private void unitUpdater() {
        minersUnitUpdater();
        offenseUnitUpdater();
        defenseUnitUpdater();
        spyOffenseUnitUpdater();
        spyDefenseUnitUpdater();
    }

    private void minersUnitUpdater() {
        units.setNumMiners((Integer) minersSpinner.getValue());
    }

    private void offenseUnitUpdater() {
        units.setNumSoldiers((Integer) soldiersSpinner.getValue());
        units.setNumKnights((Integer) knightsSpinner.getValue());
        units.setNumBerserkers((Integer) berserkersSpinner.getValue());
        units.setNumWarriors((Integer) warriorsSpinner.getValue());
    }

    private void defenseUnitUpdater() {
        units.setNumGuards((Integer) guardsSpinner.getValue());
        units.setNumArchers((Integer) archersSpinner.getValue());
        units.setNumEliteArchers((Integer) eliteArcherSpinner.getValue());
        units.setNumRoyalGuards((Integer) royalGuardSpinner.getValue());
    }

    private void spyOffenseUnitUpdater() {
        units.setNumSpies((Integer) spiesSpinner.getValue());
        units.setNumInfiltrators((Integer) infiltratorSpinner.getValue());
        units.setNumAssassins((Integer) assassinSpinner.getValue());
    }

    private void spyDefenseUnitUpdater() {
        units.setNumSentries((Integer) sentriesSpinner.getValue());
        units.setNumSentinels((Integer) sentinelsSpinner.getValue());
        units.setNumInquisitors((Integer) inquisitorSpinner.getValue());
    }

    private void economyUpdater() {
        economy.refreshEconomy(units, points, structures, classDT);

        goldPerTurnField.setText(economy.getTotalGoldPerTurn().toString());
        goldPer8HoursField.setText(economy.getGoldPer8Hours().toString());
        goldPerDayField.setText(economy.getDailyIncome().toString());
    }

    private void offenseBattleUpgradesUpdater(){
        Integer newExpertSoldiers = units.getexpertSoldiers();
        
        Integer offUpgradesPrice = (Integer) offenseUpgradePriceSpinner.getValue();
        Integer offUpgradesBonus = (Integer) offenseBonusSpinner.getValue();
        Integer offUpgradesCapacity = (Integer) offenseUpgradeCapacitySpinner.getValue();
        Integer offUpgradeQuantity = (Integer) offenseUpgradeQuantitySpinner.getValue();
        
        battleUpgrades.getOffUpgrades().setExpertSoldiers(newExpertSoldiers);
        battleUpgrades.getOffUpgrades().getOffUpgrades().setCostToBuy(offUpgradesPrice);
        battleUpgrades.getOffUpgrades().getOffUpgrades().setOffenseBonus(offUpgradesBonus);
        battleUpgrades.getOffUpgrades().getOffUpgrades().setCapacity(offUpgradesCapacity);
        battleUpgrades.getOffUpgrades().getOffUpgrades().setHave(offUpgradeQuantity);
    }
    
    private void defenseBattleUpgradesUpdater(){
        Integer newExpertGuards = units.getExpertGuards();
        
        Integer defUpgradesPrice = (Integer) defenseUpgradePriceSpinner.getValue();
        Integer defUpgradesBonus = (Integer) defenseBonusSpinner.getValue();
        Integer defUpgradesCapacity = (Integer) defenseUpgradeCapacitySpinner.getValue();
        Integer defUpgradeQuantity = (Integer) defenseUpgradeQuantitySpinner.getValue();
        
        battleUpgrades.getDefUpgrades().setExpertGuards(newExpertGuards);
        battleUpgrades.getDefUpgrades().getDefUpgrades().setCostToBuy(defUpgradesPrice);
        battleUpgrades.getDefUpgrades().getDefUpgrades().setDefenseBonus(defUpgradesBonus);
        battleUpgrades.getDefUpgrades().getDefUpgrades().setCapacity(defUpgradesCapacity);
        battleUpgrades.getDefUpgrades().getDefUpgrades().setHave(defUpgradeQuantity);
    }
    
    private void battleUpgradesUpdater(){
        offenseBattleUpgradesUpdater();
        defenseBattleUpgradesUpdater();
    }
    
    private void statsUpdater() {
        stats.refreshStats(race, classDT, units, points, structures, armories, battleUpgrades);

        Integer offense = stats.getOffense();
        Integer defense = stats.getDefense();
        Integer spyOffense = stats.getSpyOffense();
        Integer spyDefense = stats.getSpyDefense();

        offenseField.setText(offense.toString());
        defenseField.setText(defense.toString());
        spyOffenseField.setText(spyOffense.toString());
        spyDefenseField.setText(spyDefense.toString());
    }

    private void allTabsPanelFocusGained(FocusEvent e) {
        refreshEverything();
    }

    private void allTabsPanelStateChanged(ChangeEvent e) {
        refreshEverything();
    }

    private void saveButtonMouseClicked(MouseEvent e) {
        Preferences.AccountInUse.Save();
    }

//    private void saveMenuItemActionPerformed(ActionEvent e) {
//        Preferences.AccountInUse.Save();
//    }
//
//    private void loadMenuItemActionPerformed(ActionEvent e) {
//        // TODO add your code here
//    }
//
//    private void exitMenuItemActionPerformed(ActionEvent e) {
//        Preferences.AccountInUse.Save();
//        this.dispose();
//        System.exit(0);
//    }

    private void refreshEverything() {
        welcomeLineUpdater();

        proeficiencyPointsUpdater();

        structureUpdater();

        unitUpdater();

        armoryUpdater();

        battleUpgradesUpdater();
        
        economyUpdater();

        statsUpdater();
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        // Generated using JFormDesigner Open Source Project license - unknown
//        JMenuBar menuBar1 = new JMenuBar();
//        JMenu fileMenu = new JMenu();
//        JMenuItem saveMenuItem = new JMenuItem();
//        JMenuItem loadMenuItem = new JMenuItem();
//        JMenuItem exitMenuItem = new JMenuItem();
        globalPanel = new JPanel();
        welcomeLine = new JLabel();
        saveButton = new JButton();
        refreshButton = new JButton();
        allTabsPanel = new JTabbedPane();
        generalPanel = new JPanel();
        accountNameLabel = new JLabel();
        JLabel nameLabel = new JLabel();
        JLabel levelLabel = new JLabel();
        levelSpinner = new JSpinner();
        JLabel raceLabel = new JLabel();
        JLabel raceLable = new JLabel();
        JLabel classLabel = new JLabel();
        JLabel classLable = new JLabel();
        JPanel overviewPanel = new JPanel();
        JLabel offenseLabel = new JLabel();
        offenseField = new JTextField();
        JLabel goldPerTurnLabel = new JLabel();
        goldPerTurnField = new JTextField();
        JLabel defenseLabel = new JLabel();
        defenseField = new JTextField();
        JLabel goldPer8HoursLabel = new JLabel();
        goldPer8HoursField = new JTextField();
        JLabel spyOffenseLabel = new JLabel();
        spyOffenseField = new JTextField();
        JLabel goldPerDayLabel = new JLabel();
        goldPerDayField = new JTextField();
        JLabel spyDefenseLabel = new JLabel();
        spyDefenseField = new JTextField();
        JLabel goldNextGoal = new JLabel();
        goldNextField = new JTextField();
        JLabel label1 = new JLabel();
        textField1 = new JTextField();
        JPanel unitPanel = new JPanel();
        unitTabbedPane = new JTabbedPane();
        soldiersPane = new JPanel();
        JLabel soldiersLabel = new JLabel();
        soldiersSpinner = new JSpinner();
        JLabel knightsLabel = new JLabel();
        knightsSpinner = new JSpinner();
        JLabel berserkersLabel = new JLabel();
        berserkersSpinner = new JSpinner();
        JLabel warriorsLabel = new JLabel();
        warriorsSpinner = new JSpinner();
        guardsPane = new JPanel();
        JLabel guardsLabel = new JLabel();
        guardsSpinner = new JSpinner();
        JLabel archersLabel = new JLabel();
        archersSpinner = new JSpinner();
        JLabel eliteArchersLabel = new JLabel();
        eliteArcherSpinner = new JSpinner();
        JLabel royalGuardsLabel = new JLabel();
        royalGuardSpinner = new JSpinner();
        spiesPane = new JPanel();
        JLabel spiesLabel = new JLabel();
        spiesSpinner = new JSpinner();
        JLabel infiltratorLabel = new JLabel();
        infiltratorSpinner = new JSpinner();
        JLabel assassinLabel = new JLabel();
        assassinSpinner = new JSpinner();
        JPanel sentriesPane = new JPanel();
        JLabel sentriesLabel = new JLabel();
        sentriesSpinner = new JSpinner();
        JLabel sentinelsLabel = new JLabel();
        sentinelsSpinner = new JSpinner();
        JLabel inquisitorLabel = new JLabel();
        inquisitorSpinner = new JSpinner();
        pointsPanel = new JPanel();
        JLabel strengthLabel = new JLabel();
        strengthSpinner = new JSpinner();
        JLabel constitutionLabel = new JLabel();
        constitutionSpinner = new JSpinner();
        JLabel intelligenceLabel = new JLabel();
        intelligenceSpinner = new JSpinner();
        JLabel wealthLabel = new JLabel();
        wealthSpinner = new JSpinner();
        JLabel charismaLabel = new JLabel();
        charismaSpinner = new JSpinner();
        defenseFortificationPanel = new JPanel();
        JLabel goldPerWorkerLabel = new JLabel();
        goldPerWorkerSpinner = new JSpinner();
        JLabel fortGoldPerTurnLabel = new JLabel();
        fortGoldPerTurnSpinner = new JSpinner();
        JLabel defenseBousLabel = new JLabel();
        defenseBonusSpinner = new JSpinner();
        JLabel offenseBonusLabel = new JLabel();
        offenseBonusSpinner = new JSpinner();
        JLabel spyOffenseBonusLabel = new JLabel();
        spyOffenseBonusSpinner = new JSpinner();
        JLabel spyDefenseBonusLabel = new JLabel();
        spyDefenseBonusSpinner = new JSpinner();
        armoryPanel = new JTabbedPane();
        offenseArmoryPanel = new JPanel();
        JLabel priceLabel = new JLabel();
        JLabel bonusLabel = new JLabel();
        JLabel quantityLabel = new JLabel();
        JLabel weaponsLabel = new JLabel();
        weaponsPriceSpinner = new JSpinner();
        weaponsBonusSpinner = new JSpinner();
        weaponsQuantitySpinner = new JSpinner();
        JLabel helmsLabel = new JLabel();
        helmsPriceSpinner = new JSpinner();
        helmsBonusSpinner = new JSpinner();
        helmsQuantitySpinner = new JSpinner();
        JLabel armorsLabel = new JLabel();
        armorsPriceSpinner = new JSpinner();
        armorsBonusSpinner = new JSpinner();
        armorsQuantitySpinner = new JSpinner();
        JLabel bootsLabel = new JLabel();
        bootsPriceSpinner = new JSpinner();
        bootsBonusSpinner = new JSpinner();
        bootsQuantitySpinner = new JSpinner();
        JLabel bracerslebel = new JLabel();
        bracersPriceSpinner = new JSpinner();
        bracersBonusSpinner = new JSpinner();
        bracersQuantitySpinner = new JSpinner();
        JLabel shieldsLabel = new JLabel();
        shieldsPriceSpinner = new JSpinner();
        shieldsBonusSpinner = new JSpinner();
        shieldsQuantitySpinner = new JSpinner();
        defenseArmoryPanel = new JPanel();
        JLabel priceLabel2 = new JLabel();
        JLabel bonusLabel2 = new JLabel();
        JLabel quantityLabel2 = new JLabel();
        JLabel weaponsLabel2 = new JLabel();
        weaponsPriceSpinner2 = new JSpinner();
        weaponsBonusSpinner2 = new JSpinner();
        weaponsQuantitySpinner2 = new JSpinner();
        JLabel helmsLabel2 = new JLabel();
        helmsPriceSpinner2 = new JSpinner();
        helmsBonusSpinner2 = new JSpinner();
        helmsQuantitySpinner2 = new JSpinner();
        JLabel armorsLabel2 = new JLabel();
        armorsPriceSpinner2 = new JSpinner();
        armorsBonusSpinner2 = new JSpinner();
        armorsQuantitySpinner2 = new JSpinner();
        JLabel bootsLabel2 = new JLabel();
        bootsPriceSpinner2 = new JSpinner();
        bootsBonusSpinner2 = new JSpinner();
        bootsQuantitySpinner2 = new JSpinner();
        JLabel bracerslebel2 = new JLabel();
        bracersPriceSpinner2 = new JSpinner();
        bracersBonusSpinner2 = new JSpinner();
        bracersQuantitySpinner2 = new JSpinner();
        JLabel shieldsLabel2 = new JLabel();
        shieldsPriceSpinner2 = new JSpinner();
        shieldsBonusSpinner2 = new JSpinner();
        shieldsQuantitySpinner2 = new JSpinner();
        spyOffenseArmoryPanel = new JPanel();
        JLabel priceLabel3 = new JLabel();
        JLabel bonusLabel3 = new JLabel();
        JLabel quantityLabel3 = new JLabel();
        JLabel weaponsLabel3 = new JLabel();
        weaponsPriceSpinner3 = new JSpinner();
        weaponsBonusSpinner3 = new JSpinner();
        weaponsQuantitySpinner3 = new JSpinner();
        JLabel helmsLabel3 = new JLabel();
        helmsPriceSpinner3 = new JSpinner();
        helmsBonusSpinner3 = new JSpinner();
        helmsQuantitySpinner3 = new JSpinner();
        JLabel armorsLabel3 = new JLabel();
        armorsPriceSpinner3 = new JSpinner();
        armorsBonusSpinner3 = new JSpinner();
        armorsQuantitySpinner3 = new JSpinner();
        JLabel bootsLabel3 = new JLabel();
        bootsPriceSpinner3 = new JSpinner();
        bootsBonusSpinner3 = new JSpinner();
        bootsQuantitySpinner3 = new JSpinner();
        JLabel bracerslebel3 = new JLabel();
        bracersPriceSpinner3 = new JSpinner();
        bracersBonusSpinner3 = new JSpinner();
        bracersQuantitySpinner3 = new JSpinner();
        JLabel shieldsLabel3 = new JLabel();
        shieldsPriceSpinner3 = new JSpinner();
        shieldsBonusSpinner3 = new JSpinner();
        shieldsQuantitySpinner3 = new JSpinner();
        spyDefenseArmoryPanel4 = new JPanel();
        JLabel priceLabel4 = new JLabel();
        JLabel bonusLabel4 = new JLabel();
        JLabel quantityLabel4 = new JLabel();
        JLabel weaponsLabel4 = new JLabel();
        weaponsPriceSpinner4 = new JSpinner();
        weaponsBonusSpinner4 = new JSpinner();
        weaponsQuantitySpinner4 = new JSpinner();
        JLabel helmsLabel4 = new JLabel();
        helmsPriceSpinner4 = new JSpinner();
        helmsBonusSpinner4 = new JSpinner();
        helmsQuantitySpinner4 = new JSpinner();
        JLabel armorsLabel4 = new JLabel();
        armorsPriceSpinner4 = new JSpinner();
        armorsBonusSpinner4 = new JSpinner();
        armorsQuantitySpinner4 = new JSpinner();
        JLabel bootsLabel4 = new JLabel();
        bootsPriceSpinner4 = new JSpinner();
        bootsBonusSpinner4 = new JSpinner();
        bootsQuantitySpinner4 = new JSpinner();
        JLabel bracerslebel4 = new JLabel();
        bracersPriceSpinner4 = new JSpinner();
        bracersBonusSpinner4 = new JSpinner();
        bracersQuantitySpinner4 = new JSpinner();
        JLabel shieldsLabel4 = new JLabel();
        shieldsPriceSpinner4 = new JSpinner();
        shieldsBonusSpinner4 = new JSpinner();
        shieldsQuantitySpinner4 = new JSpinner();
        battleUpgradesPanel = new JPanel();
        JLabel upgradePriceLabel = new JLabel();
        JLabel upgradeBonusLabel = new JLabel();
        JLabel upgradeQuantityLabel = new JLabel();
        JLabel offenseUpgradesLabel = new JLabel();
        offenseUpgradePriceSpinner = new JSpinner();
        offenseUpgradeBonusSpinner = new JSpinner();
        offenseUpgradeQuantitySpinner = new JSpinner();
        JLabel defenseUpgradesLabel = new JLabel();
        defenseUpgradePriceSpinner = new JSpinner();
        defenseUpgradeBonusSpinner = new JSpinner();
        defenseUpgradeQuantitySpinner = new JSpinner();
        goalsPanel = new JTabbedPane();
        statBasedGoalsPanel = new JPanel();
        JLabel desiredStatLabel = new JLabel();
        JLabel requiredSetsLabel = new JLabel();
        JLabel neededGoldLabel = new JLabel();
        JLabel offenseGoalLabel = new JLabel();
        offenseGoalSpinner = new JSpinner();
        offenseMissingSetsField = new JTextField();
        offenseNeededGoldField = new JTextField();
        JLabel defenseGoalLabel = new JLabel();
        defenseGoalSpinner = new JSpinner();
        defenseMissingSetsField = new JTextField();
        defenseNeededGoldField = new JTextField();
        JLabel spyOffenseGoalLabel = new JLabel();
        spyOffenseGoalSpinner = new JSpinner();
        spyOffenseMissingSetsField = new JTextField();
        spyOffenseNeededGoldField = new JTextField();
        JLabel spyDefenseGoalLabel = new JLabel();
        spyDefenseGoalSpinner = new JSpinner();
        spyDefenseMissingSetsFields = new JTextField();
        spyDefenseNeededGold = new JTextField();
        setBasedGoalspanel = new JPanel();
        JLabel wantedSetsLabel = new JLabel();
        JLabel reachedStatLabel = new JLabel();
        JLabel goldSetNeeded = new JLabel();
        JLabel offenseSetsLabel = new JLabel();
        offenseSetSpinner = new JSpinner();
        reachedOffenseField = new JTextField();
        neededGoldOffenseSetsField = new JTextField();
        JLabel defenseSetsLabel = new JLabel();
        defenseSetSpinner = new JSpinner();
        reachedDefenseField = new JTextField();
        neededGoldDefenseField = new JTextField();
        JLabel spyOffenseSetsLabel = new JLabel();
        spyOffenseSetsSpinner = new JSpinner();
        reachedSpyOffenseField = new JTextField();
        neededGoldSpyOffenseField = new JTextField();
        JLabel spyDefenseSetsLabel = new JLabel();
        spyDefenseSetsSpinner = new JSpinner();
        reachedSpyDefenseField = new JTextField();
        neededGoldSpyDefenseSets = new JTextField();
        minersSpinner = new JSpinner();
        JLabel minersLabel = new JLabel();
        minersSpinner = new JSpinner();
        minersPane = new JPanel();
        JLabel goldNextGoalLabel = new JLabel();
        goldNextGoalField = new JTextField();
        daysNextGoalField = new JTextField();
        JLabel daysNextGoalLabel = new JLabel();
        typeFourRadioButton = new JRadioButton();
        typeFourRadioButton2 = new JRadioButton();
        typeThreeRadioButton = new JRadioButton();
        typeThreeRadioButton2 = new JRadioButton();
        typeTwoRadioButton = new JRadioButton();
        typeTwoRadioButton2 = new JRadioButton();
        typeOneRadioButton = new JRadioButton();
        typeOneRadioButton2 = new JRadioButton();
        JLabel label2 = new JLabel();
        JLabel label3 = new JLabel();
        statTabButtonGroup = new ButtonGroup();
        setTabButtonGroup = new ButtonGroup();
        capacityLabel = new JLabel();
        offenseUpgradeCapacitySpinner = new JSpinner();
        defenseUpgradeCapacitySpinner = new JSpinner();

        //======== this ========
        setTitle("DT Calc");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setLocationByPlatform(true);
        setResizable(false);
        setName("this");
        this.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                Preferences.AccountInUse.Save();
                System.exit(0);
            }
        });
        Container contentPane = getContentPane();
        contentPane.setLayout(new TableLayout(new double[][]{
                {TableLayout.FILL},
                {TableLayout.MINIMUM, TableLayout.FILL}
        }));
        ((TableLayout) contentPane.getLayout()).setHGap(5);
        ((TableLayout) contentPane.getLayout()).setVGap(5);

//        //======== menuBar1 ========
//        {
//            menuBar1.setName("menuBar1");
//
//            //======== fileMenu ========
//            {
//                fileMenu.setText("File");
//                fileMenu.setName("fileMenu");
//
//                //---- saveMenuItem ----
//                saveMenuItem.setText("Save");
//                saveMenuItem.setName("saveMenuItem");
//                saveMenuItem.addActionListener(new ActionListener() {
//
//                    public void actionPerformed(ActionEvent e) {
//                        saveMenuItemActionPerformed(e);
//                    }
//                });
//                fileMenu.add(saveMenuItem);
//
//                //---- loadMenuItem ----
//                loadMenuItem.setText("Load");
//                loadMenuItem.setName("loadMenuItem");
//                loadMenuItem.addActionListener(new ActionListener() {
//
//                    public void actionPerformed(ActionEvent e) {
//                        loadMenuItemActionPerformed(e);
//                    }
//                });
//                fileMenu.add(loadMenuItem);
//                fileMenu.addSeparator();
//
//                //---- exitMenuItem ----
//                exitMenuItem.setText("Exit");
//                exitMenuItem.setName("exitMenuItem");
//                exitMenuItem.addActionListener(new ActionListener() {
//
//                    public void actionPerformed(ActionEvent e) {
//                        exitMenuItemActionPerformed(e);
//                    }
//                });
//                fileMenu.add(exitMenuItem);
//            }
//            menuBar1.add(fileMenu);
//        }
//        setJMenuBar(menuBar1);

        //======== globalPanel ========
        {
            globalPanel.setName("globalPanel");
            globalPanel.setLayout(new TableLayout(new double[][]{
                    {TableLayout.FILL, 130, 131},
                    {30}
            }));
            ((TableLayout) globalPanel.getLayout()).setHGap(5);
            ((TableLayout) globalPanel.getLayout()).setVGap(5);

            //---- welcomeLine ----
            welcomeLine.setText(Preferences.AccountInUse.toWelcomeLine());
            welcomeLine.setName("welcomeLine");
            globalPanel.add(welcomeLine, new TableLayoutConstraints(0, 0, 0, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

            //---- saveButton ----
            saveButton.setText("Save");
            saveButton.setName("saveButton");
            saveButton.addMouseListener(new MouseAdapter() {

                @Override
                public void mouseClicked(MouseEvent e) {
                    saveButtonMouseClicked(e);
                }
            });
            globalPanel.add(saveButton, new TableLayoutConstraints(1, 0, 1, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

            //---- refreshButton ----
            refreshButton.setText("Force Refresh");
            refreshButton.setName("refreshButton");
            refreshButton.addMouseListener(new MouseAdapter() {

                @Override
                public void mouseClicked(MouseEvent e) {
                    refreshButtonMouseClicked(e);
                }
            });
            globalPanel.add(refreshButton, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
        }
        contentPane.add(globalPanel, new TableLayoutConstraints(0, 0, 0, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

        //======== allTabsPanel ========
        {
            allTabsPanel.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
            allTabsPanel.setName("allTabsPanel");
            allTabsPanel.addFocusListener(new FocusAdapter() {

                @Override
                public void focusGained(FocusEvent e) {
                    allTabsPanelFocusGained(e);
                }
            });
            allTabsPanel.addChangeListener(new ChangeListener() {

                public void stateChanged(ChangeEvent e) {
                    allTabsPanelStateChanged(e);
                }
            });

            //======== generalPanel ========
            {
                generalPanel.setName("generalPanel");
                generalPanel.setLayout(new TableLayout(new double[][]{
                        {TableLayout.FILL, TableLayout.MINIMUM, TableLayout.FILL, TableLayout.FILL},
                        {30, 30, 30, 30}
                }));
                ((TableLayout) generalPanel.getLayout()).setHGap(5);
                ((TableLayout) generalPanel.getLayout()).setVGap(5);

                //---- accountNameLabel ----
                accountNameLabel.setText("Name");
                accountNameLabel.setName("accountNameLabel");
                generalPanel.add(accountNameLabel, new TableLayoutConstraints(1, 0, 1, 0, TableLayoutConstraints.RIGHT, TableLayoutConstraints.CENTER));

                //---- nameLabel ----
                nameLabel.setText(act.getName());
                nameLabel.setName("nameLabel");
                generalPanel.add(nameLabel, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.CENTER));

                //---- levelLabel ----
                levelLabel.setText("Level");
                levelLabel.setName("levelLabel");
                generalPanel.add(levelLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.CENTER));

                //---- levelSpinner ----
                levelSpinner.setName("levelSpinner");
                levelSpinner.setModel(new SpinnerNumberModel(act.getLevel(), 1, 300, 1));
                generalPanel.add(levelSpinner, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.CENTER));

                //---- raceLabel ----
                raceLabel.setText("Race");
                raceLabel.setName("raceLabel");
                generalPanel.add(raceLabel, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.CENTER));

                //---- raceLable ----
                raceLable.setText(act.getRace().toString());
                raceLable.setName("raceLable");
                generalPanel.add(raceLable, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.CENTER));

                //---- classLabel ----
                classLabel.setText("Class");
                classLabel.setName("classLabel");
                generalPanel.add(classLabel, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.CENTER));

                //---- classLable ----
                classLable.setText(act.getClassDT().toString());
                classLable.setName("classLable");
                generalPanel.add(classLable, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.CENTER));
            }
            allTabsPanel.addTab("General", generalPanel);

            //======== overviewPanel ========
            {
                overviewPanel.setName("overviewPanel");
                overviewPanel.setLayout(new TableLayout(new double[][]{
                        {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED},
                        {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                }));
                ((TableLayout) overviewPanel.getLayout()).setHGap(5);
                ((TableLayout) overviewPanel.getLayout()).setVGap(5);

                //---- offenseLabel ----
                offenseLabel.setText("Offense");
                offenseLabel.setName("offenseLabel");
                overviewPanel.add(offenseLabel, new TableLayoutConstraints(1, 0, 1, 0, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- offenseField ----
                offenseField.setEditable(false);
                offenseField.setName("offenseField");
                offenseField.setHorizontalAlignment(JTextField.RIGHT);
                offenseField.setText(stats.getOffense().toString());
                overviewPanel.add(offenseField, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- goldPerTurnLabel ----
                goldPerTurnLabel.setText("Gold Per Turn");
                goldPerTurnLabel.setName("goldPerTurnLabel");
                overviewPanel.add(goldPerTurnLabel, new TableLayoutConstraints(4, 0, 4, 0, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- goldPerTurnField ----
                goldPerTurnField.setEditable(false);
                goldPerTurnField.setName("goldPerTurnField");
                goldPerTurnField.setHorizontalAlignment(JTextField.RIGHT);
                goldPerTurnField.setText(economy.getTotalGoldPerTurn().toString());
                overviewPanel.add(goldPerTurnField, new TableLayoutConstraints(5, 0, 5, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- defenseLabel ----
                defenseLabel.setText("Defense");
                defenseLabel.setName("defenseLabel");
                overviewPanel.add(defenseLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- defenseField ----
                defenseField.setEditable(false);
                defenseField.setName("defenseField");
                defenseField.setHorizontalAlignment(JTextField.RIGHT);
                defenseField.setText(stats.getDefense().toString());
                overviewPanel.add(defenseField, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- goldPer8HoursLabel ----
                goldPer8HoursLabel.setText("Gold Per 8 Hours");
                goldPer8HoursLabel.setName("goldPer8HoursLabel");
                goldPer8HoursField.setHorizontalAlignment(JTextField.RIGHT);
                overviewPanel.add(goldPer8HoursLabel, new TableLayoutConstraints(4, 1, 4, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- goldPer8HoursField ----
                goldPer8HoursField.setEditable(false);
                goldPer8HoursField.setName("goldPer8HoursField");
                goldPer8HoursField.setText(economy.getGoldPer8Hours().toString());
                overviewPanel.add(goldPer8HoursField, new TableLayoutConstraints(5, 1, 5, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- spyOffenseLabel ----
                spyOffenseLabel.setText("Spy Offense");
                spyOffenseLabel.setName("spyOffenseLabel");
                overviewPanel.add(spyOffenseLabel, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- spyOffenseField ----
                spyOffenseField.setEditable(false);
                spyOffenseField.setName("spyOfenseField");
                spyOffenseField.setHorizontalAlignment(JTextField.RIGHT);
                spyOffenseField.setText(stats.getSpyOffense().toString());
                overviewPanel.add(spyOffenseField, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- goldPerDayLabel ----
                goldPerDayLabel.setText("Gold Per Day");
                goldPerDayLabel.setName("goldPerDayLabel");
                overviewPanel.add(goldPerDayLabel, new TableLayoutConstraints(4, 2, 4, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- goldPerDayField ----
                goldPerDayField.setEditable(false);
                goldPerDayField.setName("goldPerDayField");
                goldPerDayField.setHorizontalAlignment(JTextField.RIGHT);
                goldPerDayField.setText(economy.getDailyIncome().toString());
                overviewPanel.add(goldPerDayField, new TableLayoutConstraints(5, 2, 5, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- spyDefenseLabel ----
                spyDefenseLabel.setText("Spy Defense");
                spyDefenseLabel.setName("spyDefenseLabel");
                overviewPanel.add(spyDefenseLabel, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- spyDefenseField ----
                spyDefenseField.setEditable(false);
                spyDefenseField.setName("spyDefenseField");
                spyDefenseField.setHorizontalAlignment(JTextField.RIGHT);
                spyDefenseField.setText(stats.getOffense().toString());
                overviewPanel.add(spyDefenseField, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- goldNextGoalLabel ----
                goldNextGoalLabel.setText("Gold To Next Goal");
                goldNextGoalLabel.setName("goldNextGoal");
                overviewPanel.add(goldNextGoalLabel, new TableLayoutConstraints(4, 3, 4, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- goldNextGoalField ----
                goldNextGoalField.setEditable(false);
                goldNextGoalField.setName("goldNextField");
                // TODO: Goal System
                overviewPanel.add(goldNextGoalField, new TableLayoutConstraints(5, 3, 5, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- daysNextGoalLabel ----
                daysNextGoalLabel.setText("Days To Next Goal");
                daysNextGoalLabel.setName("label1");
                overviewPanel.add(daysNextGoalLabel, new TableLayoutConstraints(4, 4, 4, 4, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- daysNextGoalField ----
                daysNextGoalField.setEditable(false);
                daysNextGoalField.setName("textField1");
                overviewPanel.add(daysNextGoalField, new TableLayoutConstraints(5, 4, 5, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
            }
            allTabsPanel.addTab("Overview", overviewPanel);

            //======== unitPanel ========
            {
                unitPanel.setName("unitPanel");
                unitPanel.setLayout(new TableLayout(new double[][]{
                        {TableLayout.FILL},
                        {TableLayout.FILL}
                }));

                //======== unitTabbedPane ========
                {
                    unitTabbedPane.setTabPlacement(SwingConstants.BOTTOM);
                    unitTabbedPane.setName("unitTabbedPane");

                    //======== soldiersPane ========
                    {
                        minersPane.setName("minersPane");
                        minersPane.setLayout(new TableLayout(new double[][]{
                                {TableLayout.FILL, 85, TableLayout.FILL, TableLayout.FILL},
                                {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                        }));
                        ((TableLayout) minersPane.getLayout()).setHGap(5);
                        ((TableLayout) minersPane.getLayout()).setVGap(5);

                        //---- minersLabel ----
                        minersLabel.setText("Miners");
                        minersLabel.setName("minersLabel");
                        minersPane.add(minersLabel, new TableLayoutConstraints(1, 0, 1, 0, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- minersSpinner ----
                        minersSpinner.setName("minersSpinner");
                        minersSpinner.setModel(new SpinnerNumberModel(units.getNumMiners(), 0, null, 1));
                        minersPane.add(minersSpinner, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    }
                    unitTabbedPane.addTab("Miners", minersPane);

                    //======== soldiersPane ========
                    {
                        soldiersPane.setName("soldiersPane");
                        soldiersPane.setLayout(new TableLayout(new double[][]{
                                {TableLayout.FILL, 85, TableLayout.FILL, TableLayout.FILL},
                                {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                        }));
                        ((TableLayout) soldiersPane.getLayout()).setHGap(5);
                        ((TableLayout) soldiersPane.getLayout()).setVGap(5);

                        //---- soldiersLabel ----
                        soldiersLabel.setText("Soldiers");
                        soldiersLabel.setName("soldiersLabel");
                        soldiersPane.add(soldiersLabel, new TableLayoutConstraints(1, 0, 1, 0, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- soldiersSpinner ----
                        soldiersSpinner.setName("soldiersSpinner");
                        soldiersSpinner.setModel(new SpinnerNumberModel(units.getNumSoldiers(), 0, null, 1));
                        //soldiersSpinner.setValue(units.getSoldiers());
                        soldiersPane.add(soldiersSpinner, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- knightsLabel ----
                        knightsLabel.setText("Knights");
                        knightsLabel.setName("knightsLabel");
                        soldiersPane.add(knightsLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- knightsSpinner ----
                        knightsSpinner.setName("kinightsSpinner");
                        knightsSpinner.setModel(new SpinnerNumberModel(units.getNumKnights(), 0, null, 1));
                        //knightsSpinner.setValue(units.getNumKnights());
                        soldiersPane.add(knightsSpinner, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- berserkersLabel ----
                        berserkersLabel.setText("Berserkers");
                        berserkersLabel.setName("berserkersLabel");
                        soldiersPane.add(berserkersLabel, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- berserkersSpinner ----
                        berserkersSpinner.setName("berserkersSpinner");
                        berserkersSpinner.setModel(new SpinnerNumberModel(units.getNumBerserkers(), 0, null, 1));
                        //berserkersSpinner.setValue(units.getNumBerserkers());
                        soldiersPane.add(berserkersSpinner, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- warriorsLabel ----
                        warriorsLabel.setText("Warriors");
                        warriorsLabel.setName("warriorsLabel");
                        soldiersPane.add(warriorsLabel, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- warriorsSpinner ----
                        warriorsSpinner.setName("warriorsSpinner");
                        warriorsSpinner.setModel(new SpinnerNumberModel(units.getNumWarriors(), 0, null, 1));
                        //warriorsSpinner.setValue(units.getNumWarriors());
                        soldiersPane.add(warriorsSpinner, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                    }
                    unitTabbedPane.addTab("Soldiers", soldiersPane);

                    //======== guardsPane ========
                    {
                        guardsPane.setName("guardsPane");
                        guardsPane.setLayout(new TableLayout(new double[][]{
                                {TableLayout.FILL, 85, TableLayout.FILL, TableLayout.FILL},
                                {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                        }));
                        ((TableLayout) guardsPane.getLayout()).setHGap(5);
                        ((TableLayout) guardsPane.getLayout()).setVGap(5);

                        //---- guardsLabel ----
                        guardsLabel.setText("Guards");
                        guardsLabel.setLabelFor(guardsSpinner);
                        guardsLabel.setName("guardsLabel");
                        guardsPane.add(guardsLabel, new TableLayoutConstraints(1, 0, 1, 0, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- guardsSpinner ----
                        guardsSpinner.setName("guardsSpinner");
                        guardsSpinner.setModel(new SpinnerNumberModel(units.getNumGuards(), 0, null, 1));
                        //guardsSpinner.setValue(units.getNumGuards());
                        guardsPane.add(guardsSpinner, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- archersLabel ----
                        archersLabel.setText("Archers");
                        archersLabel.setLabelFor(archersSpinner);
                        archersLabel.setName("archersLabel");
                        guardsPane.add(archersLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- archersSpinner ----
                        archersSpinner.setName("archersSpinner");
                        archersSpinner.setModel(new SpinnerNumberModel(units.getNumArchers(), 0, null, 1));
                        //archersSpinner.setValue(units.getNumArchers());
                        guardsPane.add(archersSpinner, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- eliteArchersLabel ----
                        eliteArchersLabel.setText("Elite Archers");
                        eliteArchersLabel.setLabelFor(eliteArcherSpinner);
                        eliteArchersLabel.setName("eliteArchersLabel");
                        guardsPane.add(eliteArchersLabel, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- eliteArcherSpinner ----
                        eliteArcherSpinner.setName("eliteArcherSpinner");
                        eliteArcherSpinner.setModel(new SpinnerNumberModel(units.getNumEliteGuards(), 0, null, 1));
                        //eliteArcherSpinner.setValue(units.getNumEliteGuards());
                        guardsPane.add(eliteArcherSpinner, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- royalGuardsLabel ----
                        royalGuardsLabel.setText("Royal Guards");
                        royalGuardsLabel.setLabelFor(royalGuardSpinner);
                        royalGuardsLabel.setName("royalGuardsLabel");
                        guardsPane.add(royalGuardsLabel, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- royalGuardSpinner ----
                        royalGuardSpinner.setName("royalGuardSpinner");
                        royalGuardSpinner.setModel(new SpinnerNumberModel(units.getNumRoyalGuards(), 0, null, 1));
                        //royalGuardSpinner.setValue(units.getNumRoyalGuards());
                        guardsPane.add(royalGuardSpinner, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                    }
                    unitTabbedPane.addTab("Guards", guardsPane);

                    //======== spiesPane ========
                    {
                        spiesPane.setName("spiesPane");
                        spiesPane.setLayout(new TableLayout(new double[][]{
                                {TableLayout.FILL, 86, TableLayout.FILL, TableLayout.FILL},
                                {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                        }));
                        ((TableLayout) spiesPane.getLayout()).setHGap(5);
                        ((TableLayout) spiesPane.getLayout()).setVGap(5);

                        //---- spiesLabel ----
                        spiesLabel.setText("Spies");
                        spiesLabel.setName("spiesLabel");
                        spiesPane.add(spiesLabel, new TableLayoutConstraints(1, 0, 1, 0, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- spiesSpinner ----
                        spiesSpinner.setName("spiesSpinner");
                        spiesSpinner.setModel(new SpinnerNumberModel(units.getNumSpies(), 0, null, 1));
                        //spiesSpinner.setValue(units.getNumSpies());
                        spiesPane.add(spiesSpinner, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- infiltratorLabel ----
                        infiltratorLabel.setText("Infiltrator");
                        infiltratorLabel.setName("infiltratorLabel");
                        spiesPane.add(infiltratorLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- infiltratorSpinner ----
                        infiltratorSpinner.setName("infiltratorSpinner");
                        infiltratorSpinner.setModel(new SpinnerNumberModel(units.getNumInfiltrators(), 0, null, 1));
                        //infiltratorSpinner.setValue(units.getNumInfiltrators());
                        spiesPane.add(infiltratorSpinner, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- assassinLabel ----
                        assassinLabel.setText("Assassin");
                        assassinLabel.setName("assassinLabel");
                        spiesPane.add(assassinLabel, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- assassinSpinner ----
                        assassinSpinner.setName("assassinSpinner");
                        assassinSpinner.setModel(new SpinnerNumberModel(units.getNumAssassins(), 0, null, 1));
                        //assassinSpinner.setValue(units.getNumAssassins());
                        spiesPane.add(assassinSpinner, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                    }
                    unitTabbedPane.addTab("Spies", spiesPane);

                    //======== sentriesPane ========
                    {
                        sentriesPane.setName("sentriesPane");
                        sentriesPane.setLayout(new TableLayout(new double[][]{
                                {TableLayout.FILL, 85, TableLayout.FILL, TableLayout.FILL},
                                {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                        }));
                        ((TableLayout) sentriesPane.getLayout()).setHGap(5);
                        ((TableLayout) sentriesPane.getLayout()).setVGap(5);

                        //---- sentriesLabel ----
                        sentriesLabel.setText("Sentries");
                        sentriesLabel.setName("sentriesLabel");
                        sentriesPane.add(sentriesLabel, new TableLayoutConstraints(1, 0, 1, 0, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- sentriesSpinner ----
                        sentriesSpinner.setName("sentriesSpinner");
                        sentriesSpinner.setModel(new SpinnerNumberModel(units.getNumSentries(), 0, null, 1));
                        sentriesPane.add(sentriesSpinner, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- sentinelsLabel ----
                        sentinelsLabel.setText("Sentinels");
                        sentinelsLabel.setName("sentinelsLabel");
                        sentriesPane.add(sentinelsLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- sentinelsSpinner ----
                        sentinelsSpinner.setName("sentinelsSpinner");
                        sentinelsSpinner.setModel(new SpinnerNumberModel(units.getNumSentinels(), 0, null, 1));
                        sentriesPane.add(sentinelsSpinner, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                        //---- inquisitorLabel ----
                        inquisitorLabel.setText("Inquisitor");
                        inquisitorLabel.setName("inquisitorLabel");
                        sentriesPane.add(inquisitorLabel, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                        //---- inquisitorSpinner ----
                        inquisitorSpinner.setName("inquisitorSpinner");
                        inquisitorSpinner.setModel(new SpinnerNumberModel(units.getNumInquisitors(), 0, null, 1));
                        sentriesPane.add(inquisitorSpinner, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                    }
                    unitTabbedPane.addTab("Sentries", sentriesPane);

                }
                unitPanel.add(unitTabbedPane, new TableLayoutConstraints(0, 0, 0, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
            }
            allTabsPanel.addTab("Units", unitPanel);

            //======== pointsPanel ========
            {
                pointsPanel.setName("pointsPanel");
                pointsPanel.setLayout(new TableLayout(new double[][]{
                        {TableLayout.FILL, TableLayout.MINIMUM, TableLayout.FILL, TableLayout.FILL},
                        {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                }));
                ((TableLayout) pointsPanel.getLayout()).setHGap(5);
                ((TableLayout) pointsPanel.getLayout()).setVGap(5);

                //---- strengthLabel ----
                strengthLabel.setText("Strength");
                strengthLabel.setName("strengthLabel");
                pointsPanel.add(strengthLabel, new TableLayoutConstraints(1, 0, 1, 0, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- strengthSpinner ----
                strengthSpinner.setName("strengthSpinner");
                strengthSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1));
                pointsPanel.add(strengthSpinner, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- constitutionLabel ----
                constitutionLabel.setText("Constitution");
                constitutionLabel.setName("constitutionLabel");
                pointsPanel.add(constitutionLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- constitutionSpinner ----
                constitutionSpinner.setName("constitutionSpinner");
                constitutionSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1));
                pointsPanel.add(constitutionSpinner, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- intelligenceLabel ----
                intelligenceLabel.setText("Intelligence");
                intelligenceLabel.setName("intelligenceLabel");
                pointsPanel.add(intelligenceLabel, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- intelligenceSpinner ----
                intelligenceSpinner.setName("intelligenceSpinner");
                intelligenceSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1));
                pointsPanel.add(intelligenceSpinner, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- wealthLabel ----
                wealthLabel.setText("Wealth");
                wealthLabel.setName("wealthLabel");
                pointsPanel.add(wealthLabel, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- wealthSpinner ----
                wealthSpinner.setName("wealthSpinner");
                wealthSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1));
                pointsPanel.add(wealthSpinner, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- charismaLabel ----
                charismaLabel.setText("Charisma");
                charismaLabel.setName("charismaLabel");
                pointsPanel.add(charismaLabel, new TableLayoutConstraints(1, 4, 1, 4, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- charismaSpinner ----
                charismaSpinner.setName("charismaSpinner");
                charismaSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1));
                pointsPanel.add(charismaSpinner, new TableLayoutConstraints(2, 4, 2, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
            }
            allTabsPanel.addTab("Points", pointsPanel);

            //======== defenseFortificationPanel ========
            {
                defenseFortificationPanel.setName("defenseFortificationPanel");
                defenseFortificationPanel.setLayout(new TableLayout(new double[][]{
                        {TableLayout.FILL, TableLayout.MINIMUM, TableLayout.FILL, TableLayout.FILL},
                        {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                }));
                ((TableLayout) defenseFortificationPanel.getLayout()).setHGap(5);
                ((TableLayout) defenseFortificationPanel.getLayout()).setVGap(5);

                //---- goldPerWorkerLabel ----
                goldPerWorkerLabel.setText("Gold Per Worker");
                goldPerWorkerLabel.setName("goldPerWorkerLabel");
                defenseFortificationPanel.add(goldPerWorkerLabel, new TableLayoutConstraints(1, 0, 1, 0, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- goldPerWorkerSpinner ----
                goldPerWorkerSpinner.setModel(new SpinnerNumberModel(structures.getGoldPerMiner(), 0, null, 5));
                goldPerWorkerSpinner.setName("goldPerWorkerSpinner");
                defenseFortificationPanel.add(goldPerWorkerSpinner, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- fortGoldPerTurnLabel ----
                fortGoldPerTurnLabel.setText("Fort Gold Per Turn");
                fortGoldPerTurnLabel.setName("fortGoldPerTurnLabel");
                defenseFortificationPanel.add(fortGoldPerTurnLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- fortGoldPerTurnSpinner ----
                fortGoldPerTurnSpinner.setModel(new SpinnerNumberModel(structures.getFortGoldPerTurn(), 0, null, 1000));
                fortGoldPerTurnSpinner.setName("fortGoldPerTurnSpinner");
                defenseFortificationPanel.add(fortGoldPerTurnSpinner, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- defenseBousLabel ----
                defenseBousLabel.setText("Defense Bonus");
                defenseBousLabel.setName("defenseBousLabel");
                defenseFortificationPanel.add(defenseBousLabel, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- defenseBonusSpinner ----
                defenseBonusSpinner.setModel(new SpinnerNumberModel(0, 0, null, 5));
                defenseBonusSpinner.setName("defenseBonusSpinner");
                defenseFortificationPanel.add(defenseBonusSpinner, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- offenseBonusLabel ----
                offenseBonusLabel.setText("Offense Bonus");
                offenseBonusLabel.setName("offenseBonusLabel");
                defenseFortificationPanel.add(offenseBonusLabel, new TableLayoutConstraints(1, 4, 1, 4, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- offenseBonusSpinner ----
                offenseBonusSpinner.setModel(new SpinnerNumberModel(0, 0, null, 5));
                offenseBonusSpinner.setName("offenseBonusSpinner");
                defenseFortificationPanel.add(offenseBonusSpinner, new TableLayoutConstraints(2, 4, 2, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- spyOffenseBonusLabel ----
                spyOffenseBonusLabel.setText("Spy Offense Bonus");
                spyOffenseBonusLabel.setName("spyOffenseBonusLabel");
                defenseFortificationPanel.add(spyOffenseBonusLabel, new TableLayoutConstraints(1, 5, 1, 5, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- spyOffenseBonusSpinner ----
                spyOffenseBonusSpinner.setModel(new SpinnerNumberModel(0, 0, null, 5));
                spyOffenseBonusSpinner.setName("spyOffenseBonusSpinner");
                defenseFortificationPanel.add(spyOffenseBonusSpinner, new TableLayoutConstraints(2, 5, 2, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- spyDefenseBonusLabel ----
                spyDefenseBonusLabel.setText("Spy Defense Bonus");
                spyDefenseBonusLabel.setName("spyDefenseBonusLabel");
                defenseFortificationPanel.add(spyDefenseBonusLabel, new TableLayoutConstraints(1, 6, 1, 6, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                //---- spyDefenseBonusSpinner ----
                spyDefenseBonusSpinner.setModel(new SpinnerNumberModel(0, 0, null, 5));
                spyDefenseBonusSpinner.setName("spyDefenseBonusSpinner");
                defenseFortificationPanel.add(spyDefenseBonusSpinner, new TableLayoutConstraints(2, 6, 2, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
            }
            allTabsPanel.addTab("Structures", defenseFortificationPanel);

            //======== armoryPanel ========
            {
                armoryPanel.setTabPlacement(SwingConstants.BOTTOM);
                armoryPanel.setName("armoryPanel");

                //======== offenseArmoryPanel ========
                {
                    offenseArmoryPanel.setName("offenseArmoryPanel");
                    offenseArmoryPanel.setLayout(new TableLayout(new double[][]{
                            {TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL},
                            {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                    }));
                    ((TableLayout) offenseArmoryPanel.getLayout()).setHGap(5);
                    ((TableLayout) offenseArmoryPanel.getLayout()).setVGap(5);

                    //---- priceLabel ----
                    priceLabel.setText("Price");
                    priceLabel.setName("priceLabel");
                    offenseArmoryPanel.add(priceLabel, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- bonusLabel ----
                    bonusLabel.setText("Bonus");
                    bonusLabel.setName("bonusLabel");
                    offenseArmoryPanel.add(bonusLabel, new TableLayoutConstraints(3, 0, 3, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- QuantityLabel ----
                    quantityLabel.setText("Quantity");
                    quantityLabel.setName("QuantityLabel");
                    offenseArmoryPanel.add(quantityLabel, new TableLayoutConstraints(4, 0, 4, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- weaponsLabel ----
                    weaponsLabel.setText("Weapon");
                    weaponsLabel.setName("weaponsLabel");
                    offenseArmoryPanel.add(weaponsLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- weaponsPriceSpinner ----
                    weaponsPriceSpinner.setModel(new SpinnerNumberModel(offArmory.getWeapons().getCostToBuy(), 0, null, 1));
                    weaponsPriceSpinner.setName("weaponsPriceSpinner");
                    offenseArmoryPanel.add(weaponsPriceSpinner, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- weaponsBonusSpinner ----
                    weaponsBonusSpinner.setModel(new SpinnerNumberModel(offArmory.getWeapons().getOffenseIncrease(), 0, null, 1));
                    weaponsBonusSpinner.setName("weaponsBonusSpinner");
                    offenseArmoryPanel.add(weaponsBonusSpinner, new TableLayoutConstraints(3, 1, 3, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- weaponsQuantitySpinner ----
                    weaponsQuantitySpinner.setModel(new SpinnerNumberModel(offArmory.getWeapons().getHave(), 0, null, 1));
                    weaponsQuantitySpinner.setName("waponsQuantitySpinner");
                    offenseArmoryPanel.add(weaponsQuantitySpinner, new TableLayoutConstraints(4, 1, 4, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsLabel ----
                    helmsLabel.setText("Helm");
                    helmsLabel.setName("helmsLabel");
                    offenseArmoryPanel.add(helmsLabel, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- helmsPriceSpinner ----
                    helmsPriceSpinner.setModel(new SpinnerNumberModel(offArmory.getHelms().getCostToBuy(), 0, null, 1));
                    helmsPriceSpinner.setName("helmsPriceSpinner");
                    offenseArmoryPanel.add(helmsPriceSpinner, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsBonusSpinner ----
                    helmsBonusSpinner.setModel(new SpinnerNumberModel(offArmory.getHelms().getOffenseIncrease(), 0, null, 1));
                    helmsBonusSpinner.setName("helmsBonusSpinner");
                    offenseArmoryPanel.add(helmsBonusSpinner, new TableLayoutConstraints(3, 2, 3, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsQuantitySpinner ----
                    helmsQuantitySpinner.setName("helmsQuantitySpinner");
                    helmsQuantitySpinner.setModel(new SpinnerNumberModel(offArmory.getHelms().getHave(), 0, null, 1));
                    offenseArmoryPanel.add(helmsQuantitySpinner, new TableLayoutConstraints(4, 2, 4, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsLabel ----
                    armorsLabel.setText("Armor");
                    armorsLabel.setName("armorsLabel");
                    offenseArmoryPanel.add(armorsLabel, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- armorsPriceSpinner ----
                    armorsPriceSpinner.setModel(new SpinnerNumberModel(offArmory.getArmors().getCostToBuy(), 0, null, 1));
                    armorsPriceSpinner.setName("armorsPriceSpinner");
                    offenseArmoryPanel.add(armorsPriceSpinner, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsBonusSpinner ----
                    armorsBonusSpinner.setModel(new SpinnerNumberModel(offArmory.getArmors().getOffenseIncrease(), 0, null, 1));
                    armorsBonusSpinner.setName("armorsBonusSpinner");
                    offenseArmoryPanel.add(armorsBonusSpinner, new TableLayoutConstraints(3, 3, 3, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsQuantitySpinner ----
                    armorsQuantitySpinner.setName("armorsQuantitySpinner");
                    armorsQuantitySpinner.setModel(new SpinnerNumberModel(offArmory.getArmors().getHave(), 0, null, 1));
                    offenseArmoryPanel.add(armorsQuantitySpinner, new TableLayoutConstraints(4, 3, 4, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsLabel ----
                    bootsLabel.setText("Boots");
                    bootsLabel.setName("bootsLabel");
                    offenseArmoryPanel.add(bootsLabel, new TableLayoutConstraints(1, 4, 1, 4, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- bootsPriceSpinner ----
                    bootsPriceSpinner.setModel(new SpinnerNumberModel(offArmory.getBoots().getCostToBuy(), 0, null, 1));
                    bootsPriceSpinner.setName("bootsPriceSpinner");
                    offenseArmoryPanel.add(bootsPriceSpinner, new TableLayoutConstraints(2, 4, 2, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsBonusSpinner ----
                    bootsBonusSpinner.setModel(new SpinnerNumberModel(offArmory.getBoots().getOffenseIncrease(), 0, null, 1));
                    bootsBonusSpinner.setName("bootsBonusSpinner");
                    offenseArmoryPanel.add(bootsBonusSpinner, new TableLayoutConstraints(3, 4, 3, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsQuantitySpinner ----
                    bootsQuantitySpinner.setName("bootsQuantitySpinner");
                    bootsQuantitySpinner.setModel(new SpinnerNumberModel(offArmory.getBoots().getHave(), 0, null, 1));
                    offenseArmoryPanel.add(bootsQuantitySpinner, new TableLayoutConstraints(4, 4, 4, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracerslebel ----
                    bracerslebel.setText("Bracers");
                    bracerslebel.setName("bracerslebel");
                    offenseArmoryPanel.add(bracerslebel, new TableLayoutConstraints(1, 5, 1, 5, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- bracersPriceSpinner ----
                    bracersPriceSpinner.setModel(new SpinnerNumberModel(offArmory.getBracers().getCostToBuy(), 0, null, 1));
                    bracersPriceSpinner.setName("bracersPriceSpinner");
                    offenseArmoryPanel.add(bracersPriceSpinner, new TableLayoutConstraints(2, 5, 2, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracersBonusSpinner ----
                    bracersBonusSpinner.setModel(new SpinnerNumberModel(offArmory.getBracers().getOffenseIncrease(), 0, null, 1));
                    bracersBonusSpinner.setName("bracersBonusSpinner");
                    offenseArmoryPanel.add(bracersBonusSpinner, new TableLayoutConstraints(3, 5, 3, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracersQuantitySpinner ----
                    bracersQuantitySpinner.setName("bracersQuantitySpinner");
                    bracersQuantitySpinner.setModel(new SpinnerNumberModel(offArmory.getBracers().getHave(), 0, null, 1));
                    offenseArmoryPanel.add(bracersQuantitySpinner, new TableLayoutConstraints(4, 5, 4, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsLabel ----
                    shieldsLabel.setText("Shield");
                    shieldsLabel.setName("shieldsLabel");
                    offenseArmoryPanel.add(shieldsLabel, new TableLayoutConstraints(1, 6, 1, 6, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- shieldsPriceSpinner ----
                    shieldsPriceSpinner.setModel(new SpinnerNumberModel(offArmory.getShields().getCostToBuy(), 0, null, 1));
                    shieldsPriceSpinner.setName("shieldsPriceSpinner");
                    offenseArmoryPanel.add(shieldsPriceSpinner, new TableLayoutConstraints(2, 6, 2, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsBonusSpinner ----
                    shieldsBonusSpinner.setModel(new SpinnerNumberModel(offArmory.getShields().getOffenseIncrease(), 0, null, 1));
                    shieldsBonusSpinner.setName("shieldsBonusSpinner");
                    offenseArmoryPanel.add(shieldsBonusSpinner, new TableLayoutConstraints(3, 6, 3, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsQuantitySpinner ----
                    shieldsQuantitySpinner.setName("shieldsQuantitySpinner");
                    shieldsQuantitySpinner.setModel(new SpinnerNumberModel(offArmory.getShields().getHave(), 0, null, 1));
                    offenseArmoryPanel.add(shieldsQuantitySpinner, new TableLayoutConstraints(4, 6, 4, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                }
                armoryPanel.addTab("Offense", offenseArmoryPanel);

                //======== defenseArmoryPanel ========
                {
                    defenseArmoryPanel.setName("defenseArmoryPanel");
                    defenseArmoryPanel.setLayout(new TableLayout(new double[][]{
                            {TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL},
                            {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                    }));
                    ((TableLayout) defenseArmoryPanel.getLayout()).setHGap(5);
                    ((TableLayout) defenseArmoryPanel.getLayout()).setVGap(5);

                    //---- priceLabel2 ----
                    priceLabel2.setText("Price");
                    priceLabel2.setName("priceLabel2");
                    defenseArmoryPanel.add(priceLabel2, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- bonusLabel2 ----
                    bonusLabel2.setText("Bonus");
                    bonusLabel2.setName("bonusLabel2");
                    defenseArmoryPanel.add(bonusLabel2, new TableLayoutConstraints(3, 0, 3, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- QuantityLabel2 ----
                    quantityLabel2.setText("Quantity");
                    quantityLabel2.setName("QuantityLabel2");
                    defenseArmoryPanel.add(quantityLabel2, new TableLayoutConstraints(4, 0, 4, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- weaponsLabel2 ----
                    weaponsLabel2.setText("Weapon");
                    weaponsLabel2.setName("weaponsLabel2");
                    defenseArmoryPanel.add(weaponsLabel2, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- weaponsPriceSpinner2 ----
                    weaponsPriceSpinner2.setModel(new SpinnerNumberModel(defArmory.getWeapons().getCostToBuy(), 0, null, 1));
                    weaponsPriceSpinner2.setName("weaponsPriceSpinner2");
                    defenseArmoryPanel.add(weaponsPriceSpinner2, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- weaponsBonusSpinner2 ----
                    weaponsBonusSpinner2.setModel(new SpinnerNumberModel(defArmory.getWeapons().getDefenseBonus(), 0, null, 1));
                    weaponsBonusSpinner2.setName("weaponsBonusSpinner2");
                    defenseArmoryPanel.add(weaponsBonusSpinner2, new TableLayoutConstraints(3, 1, 3, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- weaponsQuantitySpinner2 ----
                    weaponsQuantitySpinner2.setName("waponsQuantitySpinner2");
                    weaponsQuantitySpinner2.setModel(new SpinnerNumberModel(defArmory.getWeapons().getHave(), 0, null, 1));
                    defenseArmoryPanel.add(weaponsQuantitySpinner2, new TableLayoutConstraints(4, 1, 4, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsLabel2 ----
                    helmsLabel2.setText("Helm");
                    helmsLabel2.setName("helmsLabel2");
                    defenseArmoryPanel.add(helmsLabel2, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- helmsPriceSpinner2 ----
                    helmsPriceSpinner2.setModel(new SpinnerNumberModel(defArmory.getHelms().getCostToBuy(), 0, null, 1));
                    helmsPriceSpinner2.setName("helmsPriceSpinner2");
                    defenseArmoryPanel.add(helmsPriceSpinner2, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsBonusSpinner2 ----
                    helmsBonusSpinner2.setModel(new SpinnerNumberModel(defArmory.getHelms().getDefenseBonus(), 0, null, 1));
                    helmsBonusSpinner2.setName("helmsBonusSpinner2");
                    defenseArmoryPanel.add(helmsBonusSpinner2, new TableLayoutConstraints(3, 2, 3, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsQuantitySpinner2 ----
                    helmsQuantitySpinner2.setModel(new SpinnerNumberModel(defArmory.getHelms().getHave(), 0, null, 1));
                    helmsQuantitySpinner2.setName("helmsQuantitySpinner2");
                    defenseArmoryPanel.add(helmsQuantitySpinner2, new TableLayoutConstraints(4, 2, 4, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsLabel2 ----
                    armorsLabel2.setText("Armor");
                    armorsLabel2.setName("armorsLabel2");
                    defenseArmoryPanel.add(armorsLabel2, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- armorsPriceSpinner2 ----
                    armorsPriceSpinner2.setModel(new SpinnerNumberModel(defArmory.getArmors().getCostToBuy(), 0, null, 1));
                    armorsPriceSpinner2.setName("armorsPriceSpinner2");
                    defenseArmoryPanel.add(armorsPriceSpinner2, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsBonusSpinner2 ----
                    armorsBonusSpinner2.setModel(new SpinnerNumberModel(defArmory.getArmors().getDefenseBonus(), 0, null, 1));
                    armorsBonusSpinner2.setName("armorsBonusSpinner2");
                    defenseArmoryPanel.add(armorsBonusSpinner2, new TableLayoutConstraints(3, 3, 3, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsQuantitySpinner2 ----
                    armorsQuantitySpinner2.setModel(new SpinnerNumberModel(defArmory.getArmors().getHave(), 0, null, 1));
                    armorsQuantitySpinner2.setName("armorsQuantitySpinner2");
                    defenseArmoryPanel.add(armorsQuantitySpinner2, new TableLayoutConstraints(4, 3, 4, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsLabel2 ----
                    bootsLabel2.setText("Boots");
                    bootsLabel2.setName("bootsLabel2");
                    defenseArmoryPanel.add(bootsLabel2, new TableLayoutConstraints(1, 4, 1, 4, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- bootsPriceSpinner2 ----
                    bootsPriceSpinner2.setModel(new SpinnerNumberModel(defArmory.getBoots().getCostToBuy(), 0, null, 1));
                    bootsPriceSpinner2.setName("bootsPriceSpinner2");
                    defenseArmoryPanel.add(bootsPriceSpinner2, new TableLayoutConstraints(2, 4, 2, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsBonusSpinner2 ----
                    bootsBonusSpinner2.setModel(new SpinnerNumberModel(defArmory.getBoots().getDefenseBonus(), 0, null, 1));
                    bootsBonusSpinner2.setName("bootsBonusSpinner2");
                    defenseArmoryPanel.add(bootsBonusSpinner2, new TableLayoutConstraints(3, 4, 3, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsQuantitySpinner2 ----
                    bootsQuantitySpinner2.setModel(new SpinnerNumberModel(defArmory.getBoots().getHave(), 0, null, 1));
                    bootsQuantitySpinner2.setName("bootsQuantitySpinner2");
                    defenseArmoryPanel.add(bootsQuantitySpinner2, new TableLayoutConstraints(4, 4, 4, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracerslebel2 ----
                    bracerslebel2.setText("Bracers");
                    bracerslebel2.setName("bracerslebel2");
                    defenseArmoryPanel.add(bracerslebel2, new TableLayoutConstraints(1, 5, 1, 5, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- bracersPriceSpinner2 ----
                    bracersPriceSpinner2.setModel(new SpinnerNumberModel(defArmory.getBracers().getCostToBuy(), 0, null, 1));
                    bracersPriceSpinner2.setName("bracersPriceSpinner2");
                    defenseArmoryPanel.add(bracersPriceSpinner2, new TableLayoutConstraints(2, 5, 2, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracersBonusSpinner2 ----
                    bracersBonusSpinner2.setModel(new SpinnerNumberModel(defArmory.getBracers().getDefenseBonus(), 0, null, 1));
                    bracersBonusSpinner2.setName("bracersBonusSpinner2");
                    defenseArmoryPanel.add(bracersBonusSpinner2, new TableLayoutConstraints(3, 5, 3, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracersQuantitySpinner2 ----
                    bracersQuantitySpinner2.setModel(new SpinnerNumberModel(defArmory.getBracers().getHave(), 0, null, 1));
                    bracersQuantitySpinner2.setName("bracersQuantitySpinner2");
                    defenseArmoryPanel.add(bracersQuantitySpinner2, new TableLayoutConstraints(4, 5, 4, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsLabel2 ----
                    shieldsLabel2.setText("Shield");
                    shieldsLabel2.setName("shieldsLabel2");
                    defenseArmoryPanel.add(shieldsLabel2, new TableLayoutConstraints(1, 6, 1, 6, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- shieldsPriceSpinner2 ----
                    shieldsPriceSpinner2.setModel(new SpinnerNumberModel(defArmory.getShields().getCostToBuy(), 0, null, 1));
                    shieldsPriceSpinner2.setName("shieldsPriceSpinner2");
                    defenseArmoryPanel.add(shieldsPriceSpinner2, new TableLayoutConstraints(2, 6, 2, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsBonusSpinner2 ----
                    shieldsBonusSpinner2.setModel(new SpinnerNumberModel(defArmory.getShields().getDefenseBonus(), 0, null, 1));
                    shieldsBonusSpinner2.setName("shieldsBonusSpinner2");
                    defenseArmoryPanel.add(shieldsBonusSpinner2, new TableLayoutConstraints(3, 6, 3, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsQuantitySpinner2 ----
                    shieldsQuantitySpinner2.setModel(new SpinnerNumberModel(defArmory.getShields().getHave(), 0, null, 1));
                    shieldsQuantitySpinner2.setName("shieldsQuantitySpinner2");
                    defenseArmoryPanel.add(shieldsQuantitySpinner2, new TableLayoutConstraints(4, 6, 4, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                }
                armoryPanel.addTab("Defense", defenseArmoryPanel);

                //======== spyOffenseArmoryPanel ========
                {
                    spyOffenseArmoryPanel.setName("spyOffenseArmoryPanel");
                    spyOffenseArmoryPanel.setLayout(new TableLayout(new double[][]{
                            {TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL},
                            {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                    }));
                    ((TableLayout) spyOffenseArmoryPanel.getLayout()).setHGap(5);
                    ((TableLayout) spyOffenseArmoryPanel.getLayout()).setVGap(5);

                    //---- priceLabel3 ----
                    priceLabel3.setText("Price");
                    priceLabel3.setName("priceLabel3");
                    spyOffenseArmoryPanel.add(priceLabel3, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- bonusLabel3 ----
                    bonusLabel3.setText("Bonus");
                    bonusLabel3.setName("bonusLabel3");
                    spyOffenseArmoryPanel.add(bonusLabel3, new TableLayoutConstraints(3, 0, 3, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- QuantityLabel3 ----
                    quantityLabel3.setText("Quantity");
                    quantityLabel3.setName("QuantityLabel3");
                    spyOffenseArmoryPanel.add(quantityLabel3, new TableLayoutConstraints(4, 0, 4, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- weaponsLabel3 ----
                    weaponsLabel3.setText("Weapon");
                    weaponsLabel3.setName("weaponsLabel3");
                    spyOffenseArmoryPanel.add(weaponsLabel3, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- weaponsPriceSpinner3 ----
                    weaponsPriceSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getWeapons().getCostToBuy(), 0, null, 1));
                    weaponsPriceSpinner3.setName("weaponsPriceSpinner3");
                    spyOffenseArmoryPanel.add(weaponsPriceSpinner3, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- weaponsBonusSpinner3 ----
                    weaponsBonusSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getWeapons().getSpyOffenseBonus(), 0, null, 1));
                    weaponsBonusSpinner3.setName("weaponsBonusSpinner3");
                    spyOffenseArmoryPanel.add(weaponsBonusSpinner3, new TableLayoutConstraints(3, 1, 3, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- weaponsQuantitySpinner3 ----
                    weaponsQuantitySpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getWeapons().getHave(), 0, null, 1));
                    weaponsQuantitySpinner3.setName("waponsQuantitySpinner3");
                    spyOffenseArmoryPanel.add(weaponsQuantitySpinner3, new TableLayoutConstraints(4, 1, 4, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsLabel3 ----
                    helmsLabel3.setText("Helm");
                    helmsLabel3.setName("helmsLabel3");
                    spyOffenseArmoryPanel.add(helmsLabel3, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- helmsPriceSpinner3 ----
                    helmsPriceSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getHelms().getCostToBuy(), 0, null, 1));
                    helmsPriceSpinner3.setName("helmsPriceSpinner3");
                    spyOffenseArmoryPanel.add(helmsPriceSpinner3, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsBonusSpinner3 ----
                    helmsBonusSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getHelms().getSpyOffenseBonus(), 0, null, 1));
                    helmsBonusSpinner3.setName("helmsBonusSpinner3");
                    spyOffenseArmoryPanel.add(helmsBonusSpinner3, new TableLayoutConstraints(3, 2, 3, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsQuantitySpinner3 ----
                    helmsQuantitySpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getHelms().getHave(), 0, null, 1));
                    helmsQuantitySpinner3.setName("helmsQuantitySpinner3");
                    spyOffenseArmoryPanel.add(helmsQuantitySpinner3, new TableLayoutConstraints(4, 2, 4, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsLabel3 ----
                    armorsLabel3.setText("Armor");
                    armorsLabel3.setName("armorsLabel3");
                    spyOffenseArmoryPanel.add(armorsLabel3, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- armorsPriceSpinner3 ----
                    armorsPriceSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getArmors().getCostToBuy(), 0, null, 1));
                    armorsPriceSpinner3.setName("armorsPriceSpinner3");
                    spyOffenseArmoryPanel.add(armorsPriceSpinner3, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsBonusSpinner3 ----
                    armorsBonusSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getArmors().getSpyOffenseBonus(), 0, null, 1));
                    armorsBonusSpinner3.setName("armorsBonusSpinner3");
                    spyOffenseArmoryPanel.add(armorsBonusSpinner3, new TableLayoutConstraints(3, 3, 3, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsQuantitySpinner3 ----
                    armorsQuantitySpinner3.setName("armorsQuantitySpinner3");
                    armorsQuantitySpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getArmors().getHave(), 0, null, 1));
                    spyOffenseArmoryPanel.add(armorsQuantitySpinner3, new TableLayoutConstraints(4, 3, 4, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsLabel3 ----
                    bootsLabel3.setText("Boots");
                    bootsLabel3.setName("bootsLabel3");
                    spyOffenseArmoryPanel.add(bootsLabel3, new TableLayoutConstraints(1, 4, 1, 4, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- bootsPriceSpinner3 ----
                    bootsPriceSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getBoots().getCostToBuy(), 0, null, 1));
                    bootsPriceSpinner3.setName("bootsPriceSpinner3");
                    spyOffenseArmoryPanel.add(bootsPriceSpinner3, new TableLayoutConstraints(2, 4, 2, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsBonusSpinner3 ----
                    bootsBonusSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getBoots().getSpyOffenseBonus(), 0, null, 1));
                    bootsBonusSpinner3.setName("bootsBonusSpinner3");
                    spyOffenseArmoryPanel.add(bootsBonusSpinner3, new TableLayoutConstraints(3, 4, 3, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsQuantitySpinner3 ----
                    bootsQuantitySpinner3.setName("bootsQuantitySpinner3");
                    bootsQuantitySpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getBoots().getHave(), 0, null, 1));
                    spyOffenseArmoryPanel.add(bootsQuantitySpinner3, new TableLayoutConstraints(4, 4, 4, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracerslebel3 ----
                    bracerslebel3.setText("Bracers");
                    bracerslebel3.setName("bracerslebel3");
                    spyOffenseArmoryPanel.add(bracerslebel3, new TableLayoutConstraints(1, 5, 1, 5, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- bracersPriceSpinner3 ----
                    bracersPriceSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getBracers().getCostToBuy(), 0, null, 1));
                    bracersPriceSpinner3.setName("bracersPriceSpinner3");
                    spyOffenseArmoryPanel.add(bracersPriceSpinner3, new TableLayoutConstraints(2, 5, 2, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracersBonusSpinner3 ----
                    bracersBonusSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getBracers().getSpyOffenseBonus(), 0, null, 1));
                    bracersBonusSpinner3.setName("bracersBonusSpinner3");
                    spyOffenseArmoryPanel.add(bracersBonusSpinner3, new TableLayoutConstraints(3, 5, 3, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracersQuantitySpinner3 ----
                    bracersQuantitySpinner3.setName("bracersQuantitySpinner3");
                    bracersQuantitySpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getBracers().getHave(), 0, null, 1));
                    spyOffenseArmoryPanel.add(bracersQuantitySpinner3, new TableLayoutConstraints(4, 5, 4, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsLabel3 ----
                    shieldsLabel3.setText("Shield");
                    shieldsLabel3.setName("shieldsLabel3");
                    spyOffenseArmoryPanel.add(shieldsLabel3, new TableLayoutConstraints(1, 6, 1, 6, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- shieldsPriceSpinner3 ----
                    shieldsPriceSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getShields().getCostToBuy(), 0, null, 1));
                    shieldsPriceSpinner3.setName("shieldsPriceSpinner3");
                    spyOffenseArmoryPanel.add(shieldsPriceSpinner3, new TableLayoutConstraints(2, 6, 2, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsBonusSpinner3 ----
                    shieldsBonusSpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getShields().getSpyOffenseBonus(), 0, null, 1));
                    shieldsBonusSpinner3.setName("shieldsBonusSpinner3");
                    spyOffenseArmoryPanel.add(shieldsBonusSpinner3, new TableLayoutConstraints(3, 6, 3, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsQuantitySpinner3 ----
                    shieldsQuantitySpinner3.setName("shieldsQuantitySpinner3");
                    shieldsQuantitySpinner3.setModel(new SpinnerNumberModel(spyOffArmory.getShields().getHave(), 0, null, 1));
                    spyOffenseArmoryPanel.add(shieldsQuantitySpinner3, new TableLayoutConstraints(4, 6, 4, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                }
                armoryPanel.addTab("Spy Offense", spyOffenseArmoryPanel);

                //======== spyDefenseArmoryPanel4 ========
                {
                    spyDefenseArmoryPanel4.setName("spyDefenseArmoryPanel4");
                    spyDefenseArmoryPanel4.setLayout(new TableLayout(new double[][]{
                            {TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL},
                            {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}
                    }));
                    ((TableLayout) spyDefenseArmoryPanel4.getLayout()).setHGap(5);
                    ((TableLayout) spyDefenseArmoryPanel4.getLayout()).setVGap(5);

                    //---- priceLabel4 ----
                    priceLabel4.setText("Price");
                    priceLabel4.setName("priceLabel4");
                    spyDefenseArmoryPanel4.add(priceLabel4, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- bonusLabel4 ----
                    bonusLabel4.setText("Bonus");
                    bonusLabel4.setName("bonusLabel4");
                    spyDefenseArmoryPanel4.add(bonusLabel4, new TableLayoutConstraints(3, 0, 3, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- QuantityLabel4 ----
                    quantityLabel4.setText("Quantity");
                    quantityLabel4.setName("QuantityLabel4");
                    spyDefenseArmoryPanel4.add(quantityLabel4, new TableLayoutConstraints(4, 0, 4, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- weaponsLabel4 ----
                    weaponsLabel4.setText("Weapon");
                    weaponsLabel4.setName("weaponsLabel4");
                    spyDefenseArmoryPanel4.add(weaponsLabel4, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- weaponsPriceSpinner4 ----
                    weaponsPriceSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getWeapons().getCostToBuy(), 0, null, 1));
                    weaponsPriceSpinner4.setName("weaponsPriceSpinner4");
                    spyDefenseArmoryPanel4.add(weaponsPriceSpinner4, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- weaponsBonusSpinner4 ----
                    weaponsBonusSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getWeapons().getSpyDefenseBonus(), 0, null, 1));
                    weaponsBonusSpinner4.setName("weaponsBonusSpinner4");
                    spyDefenseArmoryPanel4.add(weaponsBonusSpinner4, new TableLayoutConstraints(3, 1, 3, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- weaponsQuantitySpinner4 ----
                    weaponsQuantitySpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getWeapons().getHave(), 0, null, 1));
                    weaponsQuantitySpinner4.setName("waponsQuantitySpinner4");
                    spyDefenseArmoryPanel4.add(weaponsQuantitySpinner4, new TableLayoutConstraints(4, 1, 4, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsLabel4 ----
                    helmsLabel4.setText("Helm");
                    helmsLabel4.setName("helmsLabel4");
                    spyDefenseArmoryPanel4.add(helmsLabel4, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- helmsPriceSpinner4 ----
                    helmsPriceSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getHelms().getCostToBuy(), 0, null, 1));
                    helmsPriceSpinner4.setName("helmsPriceSpinner4");
                    spyDefenseArmoryPanel4.add(helmsPriceSpinner4, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsBonusSpinner4 ----
                    helmsBonusSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getHelms().getSpyDefenseBonus(), 0, null, 1));
                    helmsBonusSpinner4.setName("helmsBonusSpinner4");
                    spyDefenseArmoryPanel4.add(helmsBonusSpinner4, new TableLayoutConstraints(3, 2, 3, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- helmsQuantitySpinner4 ----
                    helmsQuantitySpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getHelms().getHave(), 0, null, 1));
                    helmsQuantitySpinner4.setName("helmsQuantitySpinner4");
                    spyDefenseArmoryPanel4.add(helmsQuantitySpinner4, new TableLayoutConstraints(4, 2, 4, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsLabel4 ----
                    armorsLabel4.setText("Armor");
                    armorsLabel4.setName("armorsLabel4");
                    spyDefenseArmoryPanel4.add(armorsLabel4, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- armorsPriceSpinner4 ----
                    armorsPriceSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getArmors().getCostToBuy(), 0, null, 1));
                    armorsPriceSpinner4.setName("armorsPriceSpinner4");
                    spyDefenseArmoryPanel4.add(armorsPriceSpinner4, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsBonusSpinner4 ----
                    armorsBonusSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getArmors().getSpyDefenseBonus(), 0, null, 1));
                    armorsBonusSpinner4.setName("armorsBonusSpinner4");
                    spyDefenseArmoryPanel4.add(armorsBonusSpinner4, new TableLayoutConstraints(3, 3, 3, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- armorsQuantitySpinner4 ----
                    armorsQuantitySpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getArmors().getHave(), 0, null, 1));
                    armorsQuantitySpinner4.setName("armorsQuantitySpinner4");
                    spyDefenseArmoryPanel4.add(armorsQuantitySpinner4, new TableLayoutConstraints(4, 3, 4, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsLabel4 ----
                    bootsLabel4.setText("Boots");
                    bootsLabel4.setName("bootsLabel4");
                    spyDefenseArmoryPanel4.add(bootsLabel4, new TableLayoutConstraints(1, 4, 1, 4, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- bootsPriceSpinner4 ----
                    bootsPriceSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getBoots().getCostToBuy(), 0, null, 1));
                    bootsPriceSpinner4.setName("bootsPriceSpinner4");
                    spyDefenseArmoryPanel4.add(bootsPriceSpinner4, new TableLayoutConstraints(2, 4, 2, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsBonusSpinner4 ----
                    bootsBonusSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getBoots().getSpyDefenseBonus(), 0, null, 1));
                    bootsBonusSpinner4.setName("bootsBonusSpinner4");
                    spyDefenseArmoryPanel4.add(bootsBonusSpinner4, new TableLayoutConstraints(3, 4, 3, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bootsQuantitySpinner4 ----
                    bootsQuantitySpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getBoots().getHave(), 0, null, 1));
                    bootsQuantitySpinner4.setName("bootsQuantitySpinner4");
                    spyDefenseArmoryPanel4.add(bootsQuantitySpinner4, new TableLayoutConstraints(4, 4, 4, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracerslebel4 ----
                    bracerslebel4.setText("Bracers");
                    bracerslebel4.setName("bracerslebel4");
                    spyDefenseArmoryPanel4.add(bracerslebel4, new TableLayoutConstraints(1, 5, 1, 5, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- bracersPriceSpinner4 ----
                    bracersPriceSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getBracers().getCostToBuy(), 0, null, 1));
                    bracersPriceSpinner4.setName("bracersPriceSpinner4");
                    spyDefenseArmoryPanel4.add(bracersPriceSpinner4, new TableLayoutConstraints(2, 5, 2, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracersBonusSpinner4 ----
                    bracersBonusSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getBracers().getSpyDefenseBonus(), 0, null, 1));
                    bracersBonusSpinner4.setName("bracersBonusSpinner4");
                    spyDefenseArmoryPanel4.add(bracersBonusSpinner4, new TableLayoutConstraints(3, 5, 3, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- bracersQuantitySpinner4 ----
                    bracersQuantitySpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getBracers().getHave(), 0, null, 1));
                    bracersQuantitySpinner4.setName("bracersQuantitySpinner4");
                    spyDefenseArmoryPanel4.add(bracersQuantitySpinner4, new TableLayoutConstraints(4, 5, 4, 5, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsLabel4 ----
                    shieldsLabel4.setText("Shield");
                    shieldsLabel4.setName("shieldsLabel4");
                    spyDefenseArmoryPanel4.add(shieldsLabel4, new TableLayoutConstraints(1, 6, 1, 6, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- shieldsPriceSpinner4 ----
                    shieldsPriceSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getShields().getCostToBuy(), 0, null, 1));
                    shieldsPriceSpinner4.setName("shieldsPriceSpinner4");
                    spyDefenseArmoryPanel4.add(shieldsPriceSpinner4, new TableLayoutConstraints(2, 6, 2, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsBonusSpinner4 ----
                    shieldsBonusSpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getShields().getSpyDefenseBonus(), 0, null, 1));
                    shieldsBonusSpinner4.setName("shieldsBonusSpinner4");
                    spyDefenseArmoryPanel4.add(shieldsBonusSpinner4, new TableLayoutConstraints(3, 6, 3, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- shieldsQuantitySpinner4 ----
                    shieldsQuantitySpinner4.setModel(new SpinnerNumberModel(spyDefArmory.getShields().getHave(), 0, null, 1));
                    shieldsQuantitySpinner4.setName("shieldsQuantitySpinner4");
                    spyDefenseArmoryPanel4.add(shieldsQuantitySpinner4, new TableLayoutConstraints(4, 6, 4, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
                }
                armoryPanel.addTab("Spy Defense", spyDefenseArmoryPanel4);

            }
            allTabsPanel.addTab("Armory", armoryPanel);

            //======== battleUpgradesPanel ========
            {
                battleUpgradesPanel.setName("battleUpgradesPanel");
                battleUpgradesPanel.setLayout(new TableLayout(new double[][]{
                        {TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL},
                        {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}}));
                ((TableLayout) battleUpgradesPanel.getLayout()).setHGap(5);
                ((TableLayout) battleUpgradesPanel.getLayout()).setVGap(5);

                //---- upgradePriceLabel ----
                upgradePriceLabel.setText("Price");
                upgradePriceLabel.setName("upgradePriceLabel");
                battleUpgradesPanel.add(upgradePriceLabel, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                //---- upgradeBonusLabel ----
                upgradeBonusLabel.setText("Bonus");
                upgradeBonusLabel.setName("upgradeBonusLabel");
                battleUpgradesPanel.add(upgradeBonusLabel, new TableLayoutConstraints(3, 0, 3, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                //---- upgradeQuantityLabel ----
                upgradeQuantityLabel.setText("Quantity");
                upgradeQuantityLabel.setName("upgradeQuantityLabel");
                battleUpgradesPanel.add(upgradeQuantityLabel, new TableLayoutConstraints(5, 0, 5, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                //---- capacityLabel ----
                capacityLabel.setText("Capacity");
                capacityLabel.setName("capacityLabel");
                battleUpgradesPanel.add(capacityLabel, new TableLayoutConstraints(4, 0, 4, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                //---- offenseUpgradesLabel ----
                offenseUpgradesLabel.setText("Offense");
                offenseUpgradesLabel.setName("offenseUpgradesLabel");
                battleUpgradesPanel.add(offenseUpgradesLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- offenseUpgradePriceSpinner ----
                offenseUpgradePriceSpinner.setModel(new SpinnerNumberModel(battleUpgrades.getOffUpgrades().getOffUpgrades().getCostToBuy(), 0, null, 1));
                offenseUpgradePriceSpinner.setName("offenseUpgradePriceSpinner");
                battleUpgradesPanel.add(offenseUpgradePriceSpinner, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- offenseUpgradeBonusSpinner ----
                offenseUpgradeBonusSpinner.setModel(new SpinnerNumberModel(battleUpgrades.getOffUpgrades().getOffUpgrades().getOffenseBonus(), 0, null, 1));
                offenseUpgradeBonusSpinner.setName("offenseUpgradeBonusSpinner");
                battleUpgradesPanel.add(offenseUpgradeBonusSpinner, new TableLayoutConstraints(3, 1, 3, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- offenseUpgradeQuantitySpinner ----
                offenseUpgradeQuantitySpinner.setModel(new SpinnerNumberModel(battleUpgrades.getOffUpgrades().getOffUpgrades().getHave(), 0, null, 1));
                offenseUpgradeQuantitySpinner.setName("offenseUpgradeQuantitySpinner");
                battleUpgradesPanel.add(offenseUpgradeQuantitySpinner, new TableLayoutConstraints(5, 1, 5, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- offenseUpgradeCapacitySpinner ----
                offenseUpgradeCapacitySpinner.setModel(new SpinnerNumberModel(battleUpgrades.getOffUpgrades().getOffUpgrades().getCapacity(), 0, null, 1));
                offenseUpgradeCapacitySpinner.setName("offenseUpgradeCapacitySpinner");
                battleUpgradesPanel.add(offenseUpgradeCapacitySpinner, new TableLayoutConstraints(4, 1, 4, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- defenseUpgradesLabel ----
                defenseUpgradesLabel.setText("Defense");
                defenseUpgradesLabel.setName("defenseUpgradesLabel");
                battleUpgradesPanel.add(defenseUpgradesLabel, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- defenseUpgradePriceSpinner ----
                defenseUpgradePriceSpinner.setModel(new SpinnerNumberModel(battleUpgrades.getDefUpgrades().getDefUpgrades().getCostToBuy(), 0, null, 1));
                defenseUpgradePriceSpinner.setName("defenseUpgradePriceSpinner");
                battleUpgradesPanel.add(defenseUpgradePriceSpinner, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- defenseUpgradeBonusSpinner ----
                defenseUpgradeBonusSpinner.setModel(new SpinnerNumberModel(battleUpgrades.getDefUpgrades().getDefUpgrades().getDefenseBonus(), 0, null, 1));
                defenseUpgradeBonusSpinner.setName("defenseUpgradeBonusSpinner");
                battleUpgradesPanel.add(defenseUpgradeBonusSpinner, new TableLayoutConstraints(3, 2, 3, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- defenseUpgradeQuantitySpinner ----
                defenseUpgradeQuantitySpinner.setModel(new SpinnerNumberModel(battleUpgrades.getDefUpgrades().getDefUpgrades().getHave(), 0, null, 1));
                defenseUpgradeQuantitySpinner.setName("defenseUpgradeQuantitySpinner");
                battleUpgradesPanel.add(defenseUpgradeQuantitySpinner, new TableLayoutConstraints(5, 2, 5, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                //---- defenseUpgradeCapacitySpinner ----
                defenseUpgradeCapacitySpinner.setModel(new SpinnerNumberModel(battleUpgrades.getDefUpgrades().getDefUpgrades().getCapacity(), 0, null, 1));
                defenseUpgradeCapacitySpinner.setName("defenseUpgradeCapacitySpinner");
                battleUpgradesPanel.add(defenseUpgradeCapacitySpinner, new TableLayoutConstraints(4, 2, 4, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
            }
            allTabsPanel.addTab("Battle Upgraqdes", battleUpgradesPanel);

            //======== goalsPanel ========
            {
                goalsPanel.setTabPlacement(SwingConstants.BOTTOM);
                goalsPanel.setName("goalsPanel");

                //======== statBasedGoalsPanel ========
                {
                    statBasedGoalsPanel.setName("statBasedGoalsPanel");
                    statBasedGoalsPanel.setLayout(new TableLayout(new double[][]{
                            {TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL},
                            {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}}));
                    ((TableLayout) statBasedGoalsPanel.getLayout()).setHGap(5);
                    ((TableLayout) statBasedGoalsPanel.getLayout()).setVGap(5);

                    //---- desiredStatLabel ----
                    desiredStatLabel.setText("Desired Stat");
                    desiredStatLabel.setName("desiredStatLabel");
                    statBasedGoalsPanel.add(desiredStatLabel, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- requiredSetsLabel ----
                    requiredSetsLabel.setText("Missing FE Sets");
                    requiredSetsLabel.setName("requiredSetsLabel");
                    statBasedGoalsPanel.add(requiredSetsLabel, new TableLayoutConstraints(3, 0, 3, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- neededGoldLabel ----
                    neededGoldLabel.setText("Needed Gold");
                    neededGoldLabel.setName("neededGoldLabel");
                    statBasedGoalsPanel.add(neededGoldLabel, new TableLayoutConstraints(4, 0, 4, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- label2 ----
                    label2.setText("Prefered Units");
                    label2.setName("label2");
                    statBasedGoalsPanel.add(label2, new TableLayoutConstraints(5, 0, 5, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- offenseGoalLabel ----
                    offenseGoalLabel.setText("Offense");
                    offenseGoalLabel.setName("offenseGoalLabel");
                    statBasedGoalsPanel.add(offenseGoalLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- offenseGoalSpinner ----
                    offenseGoalSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1000));
                    offenseGoalSpinner.setName("offenseGoalSpinner");
                    statBasedGoalsPanel.add(offenseGoalSpinner, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- offenseMissingSetsField ----
                    offenseMissingSetsField.setEditable(false);
                    offenseMissingSetsField.setEnabled(false);
                    offenseMissingSetsField.setColumns(2);
                    offenseMissingSetsField.setName("offenseMissingSetsField");
                    statBasedGoalsPanel.add(offenseMissingSetsField, new TableLayoutConstraints(3, 1, 3, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- offenseNeededGoldField ----
                    offenseNeededGoldField.setEditable(false);
                    offenseNeededGoldField.setEnabled(false);
                    offenseNeededGoldField.setColumns(11);
                    offenseNeededGoldField.setName("offenseNeededGoldField");
                    statBasedGoalsPanel.add(offenseNeededGoldField, new TableLayoutConstraints(4, 1, 4, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- typeOneRadioButton ----
                    typeOneRadioButton.setText("Type I");
                    typeOneRadioButton.setName("typeOneRadioButton");
                    statTabButtonGroup.add(typeOneRadioButton);
                    statBasedGoalsPanel.add(typeOneRadioButton, new TableLayoutConstraints(5, 1, 5, 1, TableLayoutConstraints.LEFT, TableLayoutConstraints.FULL));

                    //---- defenseGoalLabel ----
                    defenseGoalLabel.setText("Defense");
                    defenseGoalLabel.setName("defenseGoalLabel");
                    statBasedGoalsPanel.add(defenseGoalLabel, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- defenseGoalSpinner ----
                    defenseGoalSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1000));
                    defenseGoalSpinner.setName("defenseGoalSpinner");
                    statBasedGoalsPanel.add(defenseGoalSpinner, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- defenseMissingSetsField ----
                    defenseMissingSetsField.setEditable(false);
                    defenseMissingSetsField.setEnabled(false);
                    defenseMissingSetsField.setColumns(2);
                    defenseMissingSetsField.setName("defenseMissingSetsField");
                    statBasedGoalsPanel.add(defenseMissingSetsField, new TableLayoutConstraints(3, 2, 3, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- defenseNeededGoldField ----
                    defenseNeededGoldField.setEditable(false);
                    defenseNeededGoldField.setEnabled(false);
                    defenseNeededGoldField.setColumns(2);
                    defenseNeededGoldField.setName("defenseNeededGoldField");
                    statBasedGoalsPanel.add(defenseNeededGoldField, new TableLayoutConstraints(4, 2, 4, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- typeTwoRadioButton ----
                    typeTwoRadioButton.setText("Type II");
                    typeTwoRadioButton.setName("typeTwoRadioButton");
                    statTabButtonGroup.add(typeTwoRadioButton);
                    statBasedGoalsPanel.add(typeTwoRadioButton, new TableLayoutConstraints(5, 2, 5, 2, TableLayoutConstraints.LEFT, TableLayoutConstraints.FULL));

                    //---- spyOffenseGoalLabel ----
                    spyOffenseGoalLabel.setText("Spy Offense");
                    spyOffenseGoalLabel.setName("spyOffenseGoalLabel");
                    statBasedGoalsPanel.add(spyOffenseGoalLabel, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- spyOffenseGoalSpinner ----
                    spyOffenseGoalSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1000));
                    spyOffenseGoalSpinner.setName("spyOffenseGoalSpinner");
                    statBasedGoalsPanel.add(spyOffenseGoalSpinner, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- spyOffenseMissingSetsField ----
                    spyOffenseMissingSetsField.setEditable(false);
                    spyOffenseMissingSetsField.setEnabled(false);
                    spyOffenseMissingSetsField.setColumns(2);
                    spyOffenseMissingSetsField.setName("spyOffenseMissingSetsField");
                    statBasedGoalsPanel.add(spyOffenseMissingSetsField, new TableLayoutConstraints(3, 3, 3, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- spyOffenseNeededGoldField ----
                    spyOffenseNeededGoldField.setEditable(false);
                    spyOffenseNeededGoldField.setEnabled(false);
                    spyOffenseNeededGoldField.setColumns(2);
                    spyOffenseNeededGoldField.setName("spyOffenseNeededGoldField");
                    statBasedGoalsPanel.add(spyOffenseNeededGoldField, new TableLayoutConstraints(4, 3, 4, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- typeThreeRadioButton ----
                    typeThreeRadioButton.setText("Type III");
                    typeThreeRadioButton.setName("typeThreeRadioButton");
                    statTabButtonGroup.add(typeThreeRadioButton);
                    statBasedGoalsPanel.add(typeThreeRadioButton, new TableLayoutConstraints(5, 3, 5, 3, TableLayoutConstraints.LEFT, TableLayoutConstraints.FULL));

                    //---- spyDefenseGoalLabel ----
                    spyDefenseGoalLabel.setText("Spy Defense");
                    spyDefenseGoalLabel.setName("spyDefenseGoalLabel");
                    statBasedGoalsPanel.add(spyDefenseGoalLabel, new TableLayoutConstraints(1, 4, 1, 4, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- spyDefenseGoalSpinner ----
                    spyDefenseGoalSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1000));
                    spyDefenseGoalSpinner.setName("spyDefenseGoalSpinner");
                    statBasedGoalsPanel.add(spyDefenseGoalSpinner, new TableLayoutConstraints(2, 4, 2, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- spyDefenseMissingSetsFields ----
                    spyDefenseMissingSetsFields.setEditable(false);
                    spyDefenseMissingSetsFields.setEnabled(false);
                    spyDefenseMissingSetsFields.setColumns(2);
                    spyDefenseMissingSetsFields.setName("spyDefenseMissingSetsFields");
                    statBasedGoalsPanel.add(spyDefenseMissingSetsFields, new TableLayoutConstraints(3, 4, 3, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- spyDefenseNeededGold ----
                    spyDefenseNeededGold.setEditable(false);
                    spyDefenseNeededGold.setEnabled(false);
                    spyDefenseNeededGold.setColumns(2);
                    spyDefenseNeededGold.setName("spyDefenseNeededGold");
                    statBasedGoalsPanel.add(spyDefenseNeededGold, new TableLayoutConstraints(4, 4, 4, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- typeFourRadioButton ----
                    typeFourRadioButton.setText("Type IV");
                    typeFourRadioButton.setName("typeFourRadioButton");
                    statTabButtonGroup.add(typeFourRadioButton);
                    statBasedGoalsPanel.add(typeFourRadioButton, new TableLayoutConstraints(5, 4, 5, 4, TableLayoutConstraints.LEFT, TableLayoutConstraints.FULL));
                }
                goalsPanel.addTab("Stat Based Goals", statBasedGoalsPanel);

                //======== setBasedGoalspanel ========
                {
                    setBasedGoalspanel.setName("setBasedGoalspanel");
                    setBasedGoalspanel.setLayout(new TableLayout(new double[][]{
                            {TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL},
                            {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}}));
                    ((TableLayout) setBasedGoalspanel.getLayout()).setHGap(5);
                    ((TableLayout) setBasedGoalspanel.getLayout()).setVGap(5);

                    //---- wantedSetsLabel ----
                    wantedSetsLabel.setText("Wanted Sets");
                    wantedSetsLabel.setName("wantedSetsLabel");
                    setBasedGoalspanel.add(wantedSetsLabel, new TableLayoutConstraints(2, 0, 2, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- reachedStatLabel ----
                    reachedStatLabel.setText("Reached Stat");
                    reachedStatLabel.setName("reachedStatLabel");
                    setBasedGoalspanel.add(reachedStatLabel, new TableLayoutConstraints(3, 0, 3, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- goldSetNeeded ----
                    goldSetNeeded.setText("Gold Needed");
                    goldSetNeeded.setName("goldSetNeeded");
                    setBasedGoalspanel.add(goldSetNeeded, new TableLayoutConstraints(4, 0, 4, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));

                    //---- label3 ----
                    label3.setText("Prefered Units");
                    label3.setName("label3");
                    setBasedGoalspanel.add(label3, new TableLayoutConstraints(5, 0, 5, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- offenseSetsLabel ----
                    offenseSetsLabel.setText("Offense");
                    offenseSetsLabel.setName("offenseSetsLabel");
                    setBasedGoalspanel.add(offenseSetsLabel, new TableLayoutConstraints(1, 1, 1, 1, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- offenseSetSpinner ----
                    offenseSetSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1000));
                    offenseSetSpinner.setName("offenseSetSpinner");
                    setBasedGoalspanel.add(offenseSetSpinner, new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- reachedOffenseField ----
                    reachedOffenseField.setEditable(false);
                    reachedOffenseField.setEnabled(false);
                    reachedOffenseField.setName("reachedOffenseField");
                    setBasedGoalspanel.add(reachedOffenseField, new TableLayoutConstraints(3, 1, 3, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- neededGoldOffenseSetsField ----
                    neededGoldOffenseSetsField.setEditable(false);
                    neededGoldOffenseSetsField.setEnabled(false);
                    neededGoldOffenseSetsField.setName("neededGoldOffenseSetsField");
                    setBasedGoalspanel.add(neededGoldOffenseSetsField, new TableLayoutConstraints(4, 1, 4, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- typeOneRadioButton2 ----
                    typeOneRadioButton2.setText("Type I");
                    typeOneRadioButton2.setName("typeOneRadioButton2");
                    setTabButtonGroup.add(typeOneRadioButton2);
                    setBasedGoalspanel.add(typeOneRadioButton2, new TableLayoutConstraints(5, 1, 5, 1, TableLayoutConstraints.LEFT, TableLayoutConstraints.FULL));

                    //---- defenseSetsLabel ----
                    defenseSetsLabel.setText("Defense");
                    defenseSetsLabel.setName("defenseSetsLabel");
                    setBasedGoalspanel.add(defenseSetsLabel, new TableLayoutConstraints(1, 2, 1, 2, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- defenseSetSpinner ----
                    defenseSetSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1000));
                    defenseSetSpinner.setName("defenseSetSpinner");
                    setBasedGoalspanel.add(defenseSetSpinner, new TableLayoutConstraints(2, 2, 2, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- reachedDefenseField ----
                    reachedDefenseField.setEditable(false);
                    reachedDefenseField.setEnabled(false);
                    reachedDefenseField.setName("reachedDefenseField");
                    setBasedGoalspanel.add(reachedDefenseField, new TableLayoutConstraints(3, 2, 3, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- neededGoldDefenseField ----
                    neededGoldDefenseField.setEditable(false);
                    neededGoldDefenseField.setEnabled(false);
                    neededGoldDefenseField.setName("neededGoldDefenseField");
                    setBasedGoalspanel.add(neededGoldDefenseField, new TableLayoutConstraints(4, 2, 4, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- typeTwoRadioButton2 ----
                    typeTwoRadioButton2.setText("Type II");
                    typeTwoRadioButton2.setName("typeTwoRadioButton2");
                    setTabButtonGroup.add(typeTwoRadioButton2);
                    setBasedGoalspanel.add(typeTwoRadioButton2, new TableLayoutConstraints(5, 2, 5, 2, TableLayoutConstraints.LEFT, TableLayoutConstraints.FULL));

                    //---- spyOffenseSetsLabel ----
                    spyOffenseSetsLabel.setText("Spy Offense");
                    spyOffenseSetsLabel.setName("spyOffenseSetsLabel");
                    setBasedGoalspanel.add(spyOffenseSetsLabel, new TableLayoutConstraints(1, 3, 1, 3, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- spyOffenseSetsSpinner ----
                    spyOffenseSetsSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1000));
                    spyOffenseSetsSpinner.setName("spyOffenseSetsSpinner");
                    setBasedGoalspanel.add(spyOffenseSetsSpinner, new TableLayoutConstraints(2, 3, 2, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- reachedSpyOffenseField ----
                    reachedSpyOffenseField.setEditable(false);
                    reachedSpyOffenseField.setEnabled(false);
                    reachedSpyOffenseField.setName("reachedSpyOffenseField");
                    setBasedGoalspanel.add(reachedSpyOffenseField, new TableLayoutConstraints(3, 3, 3, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- neededGoldSpyOffenseField ----
                    neededGoldSpyOffenseField.setEditable(false);
                    neededGoldSpyOffenseField.setEnabled(false);
                    neededGoldSpyOffenseField.setName("neededGoldSpyOffenseField");
                    setBasedGoalspanel.add(neededGoldSpyOffenseField, new TableLayoutConstraints(4, 3, 4, 3, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- typeThreeRadioButton2 ----
                    typeThreeRadioButton2.setText("Type III");
                    typeThreeRadioButton2.setName("typeThreeRadioButton2");
                    setTabButtonGroup.add(typeThreeRadioButton2);
                    setBasedGoalspanel.add(typeThreeRadioButton2, new TableLayoutConstraints(5, 3, 5, 3, TableLayoutConstraints.LEFT, TableLayoutConstraints.FULL));

                    //---- spyDefenseSetsLabel ----
                    spyDefenseSetsLabel.setText("Spy Defense");
                    spyDefenseSetsLabel.setName("spyDefenseSetsLabel");
                    setBasedGoalspanel.add(spyDefenseSetsLabel, new TableLayoutConstraints(1, 4, 1, 4, TableLayoutConstraints.RIGHT, TableLayoutConstraints.FULL));

                    //---- spyDefenseSetsSpinner ----
                    spyDefenseSetsSpinner.setModel(new SpinnerNumberModel(0, 0, null, 1000));
                    spyDefenseSetsSpinner.setName("spyDefenseSetsSpinner");
                    setBasedGoalspanel.add(spyDefenseSetsSpinner, new TableLayoutConstraints(2, 4, 2, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- reachedSpyDefenseField ----
                    reachedSpyDefenseField.setEditable(false);
                    reachedSpyDefenseField.setEnabled(false);
                    reachedSpyDefenseField.setName("reachedSpyDefenseField");
                    setBasedGoalspanel.add(reachedSpyDefenseField, new TableLayoutConstraints(3, 4, 3, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- neededGoldSpyDefenseSets ----
                    neededGoldSpyDefenseSets.setEditable(false);
                    neededGoldSpyDefenseSets.setEnabled(false);
                    neededGoldSpyDefenseSets.setName("neededGoldSpyDefenseSets");
                    setBasedGoalspanel.add(neededGoldSpyDefenseSets, new TableLayoutConstraints(4, 4, 4, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));

                    //---- typeFourRadioButton2 ----
                    typeFourRadioButton2.setText("Type IV");
                    typeFourRadioButton2.setName("typeFourRadioButton2");
                    setTabButtonGroup.add(typeFourRadioButton2);
                    setBasedGoalspanel.add(typeFourRadioButton2, new TableLayoutConstraints(5, 4, 5, 4, TableLayoutConstraints.LEFT, TableLayoutConstraints.FULL));
                }
                goalsPanel.addTab("Set Based Goals", setBasedGoalspanel);

            }
            allTabsPanel.addTab("Goals", goalsPanel);

        }
        contentPane.add(allTabsPanel, new TableLayoutConstraints(0, 1, 0, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
        setSize(710, 400);
        setLocationRelativeTo(null);
    }

    private JLabel welcomeLine;
    private JLabel capacityLabel;
    private JSpinner levelSpinner;
    private JTextField offenseField;
    private JTextField goldPerTurnField;
    private JTextField defenseField;
    private JTextField goldPer8HoursField;
    private JTextField spyOffenseField;
    private JTextField goldPerDayField;
    private JTextField spyDefenseField;
    private JSpinner soldiersSpinner;
    private JSpinner knightsSpinner;
    private JSpinner berserkersSpinner;
    private JSpinner warriorsSpinner;
    private JSpinner guardsSpinner;
    private JSpinner archersSpinner;
    private JSpinner eliteArcherSpinner;
    private JSpinner royalGuardSpinner;
    private JSpinner spiesSpinner;
    private JSpinner infiltratorSpinner;
    private JSpinner assassinSpinner;
    private JSpinner sentriesSpinner;
    private JSpinner sentinelsSpinner;
    private JSpinner inquisitorSpinner;
    private JSpinner strengthSpinner;
    private JSpinner constitutionSpinner;
    private JSpinner intelligenceSpinner;
    private JSpinner wealthSpinner;
    private JSpinner charismaSpinner;
    private JSpinner goldPerWorkerSpinner;
    private JSpinner fortGoldPerTurnSpinner;
    private JSpinner defenseBonusSpinner;
    private JSpinner offenseBonusSpinner;
    private JSpinner spyOffenseBonusSpinner;
    private JSpinner spyDefenseBonusSpinner;
    private JSpinner weaponsPriceSpinner;
    private JSpinner weaponsBonusSpinner;
    private JSpinner weaponsQuantitySpinner;
    private JSpinner helmsPriceSpinner;
    private JSpinner helmsBonusSpinner;
    private JSpinner helmsQuantitySpinner;
    private JSpinner armorsPriceSpinner;
    private JSpinner armorsBonusSpinner;
    private JSpinner armorsQuantitySpinner;
    private JSpinner bootsPriceSpinner;
    private JSpinner bootsBonusSpinner;
    private JSpinner bootsQuantitySpinner;
    private JSpinner bracersPriceSpinner;
    private JSpinner bracersBonusSpinner;
    private JSpinner bracersQuantitySpinner;
    private JSpinner shieldsPriceSpinner;
    private JSpinner shieldsBonusSpinner;
    private JSpinner shieldsQuantitySpinner;
    private JSpinner weaponsPriceSpinner2;
    private JSpinner weaponsBonusSpinner2;
    private JSpinner weaponsQuantitySpinner2;
    private JSpinner helmsPriceSpinner2;
    private JSpinner helmsBonusSpinner2;
    private JSpinner helmsQuantitySpinner2;
    private JSpinner armorsPriceSpinner2;
    private JSpinner armorsBonusSpinner2;
    private JSpinner armorsQuantitySpinner2;
    private JSpinner bootsPriceSpinner2;
    private JSpinner bootsBonusSpinner2;
    private JSpinner bootsQuantitySpinner2;
    private JSpinner bracersPriceSpinner2;
    private JSpinner bracersBonusSpinner2;
    private JSpinner bracersQuantitySpinner2;
    private JSpinner shieldsPriceSpinner2;
    private JSpinner shieldsBonusSpinner2;
    private JSpinner shieldsQuantitySpinner2;
    private JSpinner weaponsPriceSpinner3;
    private JSpinner weaponsBonusSpinner3;
    private JSpinner weaponsQuantitySpinner3;
    private JSpinner helmsPriceSpinner3;
    private JSpinner helmsBonusSpinner3;
    private JSpinner helmsQuantitySpinner3;
    private JSpinner armorsPriceSpinner3;
    private JSpinner armorsBonusSpinner3;
    private JSpinner armorsQuantitySpinner3;
    private JSpinner bootsPriceSpinner3;
    private JSpinner bootsBonusSpinner3;
    private JSpinner bootsQuantitySpinner3;
    private JSpinner bracersPriceSpinner3;
    private JSpinner bracersBonusSpinner3;
    private JSpinner bracersQuantitySpinner3;
    private JSpinner shieldsPriceSpinner3;
    private JSpinner shieldsBonusSpinner3;
    private JSpinner shieldsQuantitySpinner3;
    private JSpinner weaponsPriceSpinner4;
    private JSpinner weaponsBonusSpinner4;
    private JSpinner weaponsQuantitySpinner4;
    private JSpinner helmsPriceSpinner4;
    private JSpinner helmsBonusSpinner4;
    private JSpinner helmsQuantitySpinner4;
    private JSpinner armorsPriceSpinner4;
    private JSpinner armorsBonusSpinner4;
    private JSpinner armorsQuantitySpinner4;
    private JSpinner bootsPriceSpinner4;
    private JSpinner bootsBonusSpinner4;
    private JSpinner bootsQuantitySpinner4;
    private JSpinner shieldsPriceSpinner4;
    private JSpinner shieldsBonusSpinner4;
    private JSpinner shieldsQuantitySpinner4;
    private JSpinner minersSpinner;
    private JSpinner offenseUpgradeCapacitySpinner;
    private JSpinner defenseUpgradeCapacitySpinner;
    private JSpinner offenseUpgradePriceSpinner;
    private JPanel globalPanel;
    private JButton saveButton;
    private JButton refreshButton;
    private JTabbedPane allTabsPanel;
    private JPanel generalPanel;
    private JLabel accountNameLabel;
    private JTextField goldNextField;
    private JTextField textField1;
    private JTabbedPane unitTabbedPane;
    private JPanel soldiersPane;
    private ButtonGroup statTabButtonGroup;
    private JPanel pointsPanel;
    private JPanel defenseFortificationPanel;
    private JSpinner offenseUpgradeBonusSpinner;
    private JTabbedPane armoryPanel;
    private JPanel spyOffenseArmoryPanel;
    private JPanel spyDefenseArmoryPanel4;
    private JPanel offenseArmoryPanel;
    private JSpinner bracersPriceSpinner4;
    private JPanel defenseArmoryPanel;
    private JSpinner bracersBonusSpinner4;
    private JSpinner bracersQuantitySpinner4;
    private JPanel battleUpgradesPanel;
    private JSpinner offenseUpgradeQuantitySpinner;
    private JSpinner defenseUpgradePriceSpinner;
    private JSpinner defenseUpgradeBonusSpinner;
    private JSpinner defenseUpgradeQuantitySpinner;
    private JTabbedPane goalsPanel;
    private JPanel statBasedGoalsPanel;
    private JSpinner offenseGoalSpinner;
    private JTextField offenseMissingSetsField;
    private JTextField offenseNeededGoldField;
    private JSpinner defenseGoalSpinner;
    private JTextField defenseMissingSetsField;
    private JTextField defenseNeededGoldField;
    private JSpinner spyOffenseGoalSpinner;
    private JTextField spyOffenseMissingSetsField;
    private JTextField spyOffenseNeededGoldField;
    private JSpinner spyDefenseGoalSpinner;
    private JTextField spyDefenseMissingSetsFields;
    private JTextField spyDefenseNeededGold;
    private JPanel setBasedGoalspanel;
    private JSpinner offenseSetSpinner;
    private JTextField reachedOffenseField;
    private JTextField neededGoldOffenseSetsField;
    private JSpinner defenseSetSpinner;
    private JTextField reachedDefenseField;
    private JTextField neededGoldDefenseField;
    private JSpinner spyOffenseSetsSpinner;
    private JTextField reachedSpyOffenseField;
    private JTextField neededGoldSpyOffenseField;
    private JSpinner spyDefenseSetsSpinner;
    private JTextField reachedSpyDefenseField;
    private JTextField neededGoldSpyDefenseSets;
    private JPanel minersPane;
    private JTextField goldNextGoalField;
    private JTextField daysNextGoalField;
    private JRadioButton typeFourRadioButton;
    private JRadioButton typeFourRadioButton2;
    private JRadioButton typeThreeRadioButton;
    private JRadioButton typeThreeRadioButton2;
    private JRadioButton typeTwoRadioButton;
    private JRadioButton typeTwoRadioButton2;
    private JRadioButton typeOneRadioButton;
    private JRadioButton typeOneRadioButton2;
    private ButtonGroup setTabButtonGroup;
    private JPanel spiesPane;
    private JPanel guardsPane;

    // JFormDesigner - End of variables declaration  //GEN-END:variables
}
